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:
@@ -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", "")}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user