diff --git a/backend/apps/outputs/workspace_io.py b/backend/apps/outputs/workspace_io.py index 3cb7bcec..de3e0a08 100644 --- a/backend/apps/outputs/workspace_io.py +++ b/backend/apps/outputs/workspace_io.py @@ -75,6 +75,12 @@ WALK_SKIP_DIRS = frozenset({ ".ruff_cache", }) +# OS/editor junk files that ride along in a workspace but are noise in an export. +WALK_SKIP_FILES = frozenset({ + ".DS_Store", + "Thumbs.db", +}) + # Cap per-file response size at 256 KB. Hand-written source rarely exceeds this; auto-generated bundles routinely run into the MBs and they're not what the user/agent is editing. Anything over the cap returns a truncated stub the frontend treats as "open the file directly to see full contents." P_WALK_MAX_FILE_BYTES = 256 * 1024 diff --git a/backend/apps/swarm/entities/apps.py b/backend/apps/swarm/entities/apps.py index 37cbb0ad..024c37ad 100644 --- a/backend/apps/swarm/entities/apps.py +++ b/backend/apps/swarm/entities/apps.py @@ -12,7 +12,7 @@ import socket from uuid import uuid4 from backend.apps.outputs.models import Output -from backend.apps.outputs.workspace_io import WALK_SKIP_DIRS, save, load_output +from backend.apps.outputs.workspace_io import WALK_SKIP_DIRS, WALK_SKIP_FILES, save, load_output from backend.config.paths import OUTPUTS_DIR, OUTPUTS_WORKSPACE_DIR from backend.apps.swarm.exportable import DepRef, ExportContext, RemapTable @@ -57,6 +57,8 @@ class AppExportable: # .env is install-specific (absolute paths + port); .env.example travels instead. if fn == ".env": continue + if fn in WALK_SKIP_FILES: + continue full = os.path.join(root, fn) if os.path.islink(full): continue