mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-27 12:04:49 +02:00
[eric] swarm: exclude .DS_Store/Thumbs.db from app exports (WALK_SKIP_FILES)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user