Skip to main content

Module size

Module size 

Source
Expand description

Workspace byte-size estimation before side-git snapshot init.

A full git add -A on multi-GB trees (node_modules, model weights, etc.) can block for minutes. We walk the workspace with the same ripgrep-style skip rules as search tools and bail out before touching git when the on-disk footprint exceeds [snapshots] max_workspace_gb.

Constants§

DEFAULT_SNAPSHOT_MAX_WORKSPACE_GB
Default cap when [snapshots] max_workspace_gb is unset (matches upstream v0.8.32).

Functions§

estimate_workspace_bytes
Sum file sizes under workspace, honoring gitignore + skip-dir rules. Stops early once limit_bytes would be exceeded (pass None for full scan).
workspace_exceeds_size_limit
Returns true when the workspace tree exceeds max_gb ( gibibyte-style GB: max_gb * 1024^3 bytes).