@votadev/tooncode 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tooncode.py +16 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@votadev/tooncode",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Free AI Coding Agent CLI — Claude Code alternative powered by free models. 20 tools, multi-agent team, browser automation, MCP servers.",
5
5
  "author": "VotaLab",
6
6
  "license": "MIT",
package/tooncode.py CHANGED
@@ -8,7 +8,7 @@ Usage:
8
8
  python tooncode.py
9
9
  """
10
10
 
11
- VERSION = "2.2.1"
11
+ VERSION = "2.2.3"
12
12
 
13
13
  import httpx
14
14
  import json
@@ -98,6 +98,12 @@ def _load_settings() -> dict:
98
98
  settings[k] = v
99
99
  except Exception:
100
100
  pass
101
+ else:
102
+ # First run — create default settings.json
103
+ try:
104
+ _save_settings(settings)
105
+ except Exception:
106
+ pass
101
107
  return settings
102
108
 
103
109
  def _save_settings(settings: dict):
@@ -5309,11 +5315,16 @@ def main(_initial_prompt=None):
5309
5315
  # Inject boss answer as a separate user message after tool results
5310
5316
  messages.append({"role": "user", "content": tool_results})
5311
5317
  messages.append({"role": "assistant", "content": [{"type": "text", "text": "I'm stuck. Let me check the boss's advice."}]})
5318
+ # Parse boss answer for file paths and code blocks
5319
+ fix_instructions = f"[BOSSHELP - APPLY NOW]\n{boss_answer}\n\n"
5320
+ fix_instructions += "STEP-BY-STEP INSTRUCTIONS:\n"
5321
+ fix_instructions += "1. Read each file mentioned above using the read tool\n"
5322
+ fix_instructions += "2. Apply each code change using the edit tool (oldString → newString)\n"
5323
+ fix_instructions += "3. If the fix says to run a command, use the bash tool\n"
5324
+ fix_instructions += "4. After applying, verify with bash (e.g. python -c 'import module')\n"
5325
+ fix_instructions += "\nDo NOT explain. Do NOT repeat failed approach. USE TOOLS NOW."
5312
5326
  messages.append({"role": "user", "content": [{"type": "text", "text":
5313
- f"[BOSSHELP from Claude Code - APPLY THIS FIX]\n{boss_answer}\n\n"
5314
- f"IMPORTANT: You MUST use tools (edit, write, bash) to apply this fix RIGHT NOW. "
5315
- f"Do NOT just explain what to do. Do NOT repeat the same approach that failed. "
5316
- f"Read the fix above and execute it step by step using your tools.",
5327
+ fix_instructions,
5317
5328
  "cache_control": {"type": "ephemeral"}}]})
5318
5329
  continue # Skip the normal append below
5319
5330
  else: