feat: configurable path replacements for ComfyUI Docker mount differences

Added 'Path Replacements' section in the Projects tab. Each entry is a
from→to string substitution applied to project_path output, fixing
casing mismatches between Docker containers (e.g. Davinci → davinci).
Stored in .editor_config.json under 'path_replacements'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 16:19:10 +02:00
parent e6d260eb1a
commit 3c5d2fc4e0
2 changed files with 48 additions and 0 deletions
+6
View File
@@ -62,6 +62,12 @@ def _get_project(name: str) -> dict[str, Any]:
resolved = resolve_path_case_insensitive(folder_path)
if resolved:
folder_path = str(resolved)
# Apply configured path replacements (e.g. Docker mount casing differences)
config = load_config()
for rep in config.get("path_replacements", []):
src, dst = rep.get("from", ""), rep.get("to", "")
if src:
folder_path = folder_path.replace(src, dst)
return {"name": proj["name"], "folder_path": folder_path,
"description": proj.get("description", "")}