feat(doctor): suppress duplicate filename warnings when full path syntax is active (#917)

This commit is contained in:
Will Miao
2026-05-22 22:35:06 +08:00
parent 806555cf06
commit f105500740
3 changed files with 26 additions and 0 deletions

View File

@@ -686,6 +686,9 @@ class DoctorHandler:
)
async def resolve_filename_conflicts(self, request: web.Request) -> web.Response:
if self._settings.get("lora_syntax_format", "legacy") == "full":
return web.json_response({"success": True, "renamed": [], "count": 0})
renamed: list[dict[str, Any]] = []
try:
@@ -990,6 +993,18 @@ class DoctorHandler:
}
async def _check_filename_conflicts(self) -> dict[str, Any]:
# When full path syntax is active, duplicate filenames across subfolders
# are not ambiguous (<lora:subfolder/name:strength>), so skip the check.
if self._settings.get("lora_syntax_format", "legacy") == "full":
return {
"id": "filename_conflicts",
"title": "Duplicate Filename Conflicts",
"status": "ok",
"summary": "Full path syntax is active — duplicate filenames across folders are not ambiguous.",
"details": [],
"actions": [],
}
all_conflicts: list[dict[str, Any]] = []
total_conflict_groups = 0
total_conflict_files = 0