diff --git a/archivebox/opencode/views.py b/archivebox/opencode/views.py index cc152887..6a728753 100644 --- a/archivebox/opencode/views.py +++ b/archivebox/opencode/views.py @@ -44,7 +44,8 @@ _CONFIG_PATH = Path(opencode_plugin.__file__).with_name("config.json") _DEFAULT_MODEL = "opencode/big-pickle" _DEFAULT_CONFIG = f'''{{ "$schema": "https://opencode.ai/config.json", - "model": "{_DEFAULT_MODEL}" + "model": "{_DEFAULT_MODEL}", + "snapshot": false }} ''' diff --git a/archivebox/tests/test_opencode_agent.py b/archivebox/tests/test_opencode_agent.py index 9cc9aad9..af0ef60c 100644 --- a/archivebox/tests/test_opencode_agent.py +++ b/archivebox/tests/test_opencode_agent.py @@ -411,6 +411,7 @@ def test_opencode_starts_with_isolated_state(live_opencode): assert Path(live_opencode.settings["workdir"]).resolve() == Path(workdir) assert Path(str(project.json()["worktree"])).resolve() == Path(workdir) assert config.json()["model"] == "opencode/big-pickle" + assert config.json()["snapshot"] is False assert live_opencode.process.poll() is None assert (live_opencode.config.data_dir / ".git").is_dir() assert (state_dir / "data" / "opencode" / "opencode.db").is_file() @@ -442,7 +443,9 @@ def test_opencode_state_dir_is_separate_from_workdir(tmp_path): assert loaded_skill.is_symlink() assert loaded_skill.resolve() == editable_skill.resolve() assert f"ArchiveBox collection directory: {settings['archivebox_data_dir']}" in editable_skill.read_text() - assert json.loads((state_dir / "config" / "opencode" / "opencode.jsonc").read_text())["model"] == "opencode/big-pickle" + opencode_config = json.loads((state_dir / "config" / "opencode" / "opencode.jsonc").read_text()) + assert opencode_config["model"] == "opencode/big-pickle" + assert opencode_config["snapshot"] is False @pytest.mark.parametrize(