feat(settings): add auto-organize exclusions

This commit is contained in:
pixelpaws
2025-11-20 16:08:32 +08:00
parent 5093c30c06
commit 07721af87c
21 changed files with 339 additions and 18 deletions

View File

@@ -540,7 +540,7 @@ def test_auto_organize_progress_returns_latest_snapshot(mock_service):
def test_auto_organize_route_emits_progress(mock_service, monkeypatch: pytest.MonkeyPatch):
async def fake_auto_organize(self, file_paths=None, progress_callback=None):
async def fake_auto_organize(self, file_paths=None, progress_callback=None, exclusion_patterns=None):
result = AutoOrganizeResult()
result.total = 1
result.processed = 1

View File

@@ -53,10 +53,15 @@ class StubFileService:
*,
file_paths: Optional[List[str]] = None,
progress_callback=None,
exclusion_patterns=None,
) -> AutoOrganizeResult:
result = AutoOrganizeResult()
result.total = len(file_paths or [])
self.calls.append({"file_paths": file_paths, "progress_callback": progress_callback})
self.calls.append({
"file_paths": file_paths,
"progress_callback": progress_callback,
"exclusion_patterns": exclusion_patterns,
})
return result
@@ -144,6 +149,7 @@ async def test_auto_organize_use_case_executes_with_lock() -> None:
assert isinstance(result, AutoOrganizeResult)
assert file_service.calls[0]["file_paths"] == ["model1"]
assert file_service.calls[0]["exclusion_patterns"] is None
async def test_auto_organize_use_case_rejects_when_running() -> None: