anixcode 0.12.1__tar.gz → 0.12.2__tar.gz
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.
- {anixcode-0.12.1 → anixcode-0.12.2}/PKG-INFO +1 -1
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/__init__.py +1 -1
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/agent.py +4 -2
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/settings.py +3 -1
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/PKG-INFO +1 -1
- {anixcode-0.12.1 → anixcode-0.12.2}/pyproject.toml +1 -1
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_v011_features.py +16 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/LICENSE +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/README.md +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/__main__.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/airpc.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/browser.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/checkpoints.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/cli.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/commands.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/compaction.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/danger.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/i18n.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/i18n_en.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/images.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/llm.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/mcp.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/mentions.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/projects.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/prompts.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/providers.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/storage.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/__init__.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/base.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/browser.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/files.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/search.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/shell.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/todo.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/web.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/__init__.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/anim.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/app.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/app.tcss +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/screens.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/widgets.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/SOURCES.txt +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/dependency_links.txt +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/entry_points.txt +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/requires.txt +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/top_level.txt +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/setup.cfg +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_agent.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_commands.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_i18n.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_images.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_llm.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_mcp.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_projects.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_providers.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_reliability.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_safety_mentions.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_settings.py +0 -0
- {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_tools.py +0 -0
|
@@ -169,7 +169,7 @@ class SubagentTool(Tool):
|
|
|
169
169
|
sub_settings = Settings(
|
|
170
170
|
provider=self._parent.settings.provider,
|
|
171
171
|
model=self._parent.settings.model,
|
|
172
|
-
max_steps=min(15, self._parent.settings.max_steps),
|
|
172
|
+
max_steps=15 if self._parent.settings.max_steps <= 0 else min(15, self._parent.settings.max_steps),
|
|
173
173
|
context_window=self._parent.settings.context_window,
|
|
174
174
|
protect_secrets=self._parent.settings.protect_secrets,
|
|
175
175
|
full_access=self._parent.settings.full_access,
|
|
@@ -397,7 +397,9 @@ class Agent:
|
|
|
397
397
|
system = {"role": "system", "content": system_prompt(self.ctx.root, self.mode, goal=self.active_goal)}
|
|
398
398
|
overflow_retried = False
|
|
399
399
|
gave_up = False # compaction could not shrink the history: don't retry every step
|
|
400
|
-
|
|
400
|
+
step = 0
|
|
401
|
+
while self.settings.max_steps <= 0 or step < self.settings.max_steps:
|
|
402
|
+
step += 1
|
|
401
403
|
limit = self.window * compaction.COMPACT_AT
|
|
402
404
|
try:
|
|
403
405
|
gave_up, compact_events = await self._maybe_compact(session, limit, gave_up)
|
|
@@ -29,7 +29,7 @@ class Settings:
|
|
|
29
29
|
animations: bool = True
|
|
30
30
|
# "ask" | "allow" | "deny" for tools that change things. Reading is always allowed.
|
|
31
31
|
permissions: dict[str, str] = field(default_factory=lambda: {"edit": "ask", "exec": "ask"})
|
|
32
|
-
max_steps: int =
|
|
32
|
+
max_steps: int = 0 # 0 = unlimited (stop anytime with Esc)
|
|
33
33
|
full_access: bool = False # the agent edits and runs commands without asking
|
|
34
34
|
confirm_dangerous: bool = False # if true, dangerous shell commands still ask even in full_access
|
|
35
35
|
protect_secrets: bool = True # warn/ask before reading .env, private keys, credentials
|
|
@@ -74,6 +74,8 @@ def load_settings(base: Path | None = None) -> Settings:
|
|
|
74
74
|
raw["theme"] = "anix" # 0.1.0 saved its old default theme; switch to the new default once
|
|
75
75
|
if raw.get("theme") == "opencode":
|
|
76
76
|
raw["theme"] = "noir" # renamed in 0.8
|
|
77
|
+
if raw.get("max_steps") == 50:
|
|
78
|
+
raw["max_steps"] = 0 # old default cap removed; 0 = unlimited
|
|
77
79
|
s = Settings(**{k: v for k, v in raw.items() if k in known})
|
|
78
80
|
s.permissions = {k: v for k, v in dict(s.permissions).items() if v in PERMISSION_VALUES}
|
|
79
81
|
s.custom_providers = [
|
|
@@ -346,5 +346,21 @@ def test_tui_boots_with_browser_pane_and_todo_bar(tmp_path):
|
|
|
346
346
|
asyncio.run(go())
|
|
347
347
|
|
|
348
348
|
|
|
349
|
+
def test_unlimited_steps_by_default_and_legacy_50_migrates(tmp_path):
|
|
350
|
+
from anixcode.settings import load_settings
|
|
351
|
+
|
|
352
|
+
# Old settings.json with default max_steps=50 migrates to 0 (unlimited)
|
|
353
|
+
(tmp_path / "settings.json").write_text('{"max_steps": 50}', encoding="utf-8")
|
|
354
|
+
assert load_settings(tmp_path).max_steps == 0
|
|
355
|
+
|
|
356
|
+
(tmp_path / "a.txt").write_text("hi\n")
|
|
357
|
+
script = [Completion(tool_calls=[_call("read", f"r{i}", path="a.txt")]) for i in range(55)]
|
|
358
|
+
script.append(Completion(text="finished after 55 steps"))
|
|
359
|
+
agent = Agent(ScriptClient(script), "m", tmp_path, Settings())
|
|
360
|
+
events = asyncio.run(_collect(agent.run(Session("u1", str(tmp_path)), "run long")))
|
|
361
|
+
assert isinstance(events[-1], Done)
|
|
362
|
+
assert any(isinstance(e, TextDelta) and "55 steps" in e.text for e in events)
|
|
363
|
+
|
|
364
|
+
|
|
349
365
|
async def _collect(aiter):
|
|
350
366
|
return [ev async for ev in aiter]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|