[eric] swarm: exclude .DS_Store/Thumbs.db from app exports (WALK_SKIP_FILES)

This commit is contained in:
ciregenz
2026-06-26 04:42:02 -07:00
parent bdbd0acb0d
commit ce7b22a216
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -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
+3 -1
View File
@@ -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