feat: 审查修复一轮——sync 解引用软链技能/防 CLAUDE.md 崩溃/init 建 agent-tasks;upgrade SHA256 校验+收尾容错;新增 xiaohe switch 回滚;uninstall --all 扩到 ~/.metabot ~/.mytoolkit;下载路径改 xiaohe-agent
This commit is contained in:
@@ -30,6 +30,10 @@ def _populate(home: Path) -> None:
|
||||
(local_bin / "completions" / "_metabot").write_text("comp")
|
||||
(home / ".xiaohe" / "agent").mkdir(parents=True)
|
||||
(home / ".xiaohe" / "agent" / "config.json").write_text("{}")
|
||||
(home / ".metabot").mkdir()
|
||||
(home / ".metabot" / "bots.json").write_text("{}")
|
||||
(home / ".mytoolkit").mkdir()
|
||||
(home / ".mytoolkit" / "config.json").write_text("{}")
|
||||
(home / "workspace").mkdir()
|
||||
app = home / "Desktop" / "Xiaohe Agent.app" / "Contents"
|
||||
app.mkdir(parents=True)
|
||||
@@ -49,15 +53,19 @@ class TestUninstall:
|
||||
assert not (local_bin / "completions").exists() # empty dir cleaned
|
||||
assert not (fake_home / "Desktop" / "Xiaohe Agent.app").exists()
|
||||
assert (fake_home / ".xiaohe" / "agent" / "config.json").is_file()
|
||||
assert (fake_home / ".metabot" / "bots.json").is_file()
|
||||
assert (fake_home / ".mytoolkit" / "config.json").is_file()
|
||||
assert (fake_home / "workspace").is_dir()
|
||||
|
||||
def test_all_removes_xiaohe_dir(self, fake_home: Path) -> None:
|
||||
def test_all_removes_config_dirs(self, fake_home: Path) -> None:
|
||||
_populate(fake_home)
|
||||
result = CliRunner().invoke(
|
||||
un_mod.uninstall_cmd, ["--all", "--yes"], input="y\ndelete-all\n"
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
assert not (fake_home / ".xiaohe").exists()
|
||||
assert not (fake_home / ".metabot").exists()
|
||||
assert not (fake_home / ".mytoolkit").exists()
|
||||
assert (fake_home / "workspace").is_dir() # workspace never touched
|
||||
|
||||
def test_all_requires_full_chain_even_with_yes(self, fake_home: Path) -> None:
|
||||
|
||||
Reference in New Issue
Block a user