You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhance createTree chunking: payload-size awareness and per-file threshold #22
When creating trees with many text files, chunks by entry count only (TREE_ENTRY_CHUNK_SIZE = 100). It does not account for total request payload size, which is dominated by inline content for text entries.
A chunk of 100 large text files could theoretically exceed GitHub's request body limits. Additionally, very large individual text files could be more safely handled via createBlob with base64 encoding than inlined.
Proposed Enhancements
Payload-size-aware chunking: When building chunks, track approximate serialized size (bytes) and start a new chunk when approaching the limit (e.g., GitHub's ~100 MB request body limit).
Per-file size threshold fallback: For text files above a configurable size threshold (e.g., 1 MB), use createBlob with base64 instead of inline content to reduce risk of oversized requests and simplify chunking logic.
Context
Raised in PR #21 Copilot review (comment on createTreeChained). Deferred from that PR because:
Activity
feat: optimize createTree to reduce REST API usage (#19)
refactor(commit): apply retry per REST call site in createTree (#34)
feat(commit): make createTree chunking payload-size aware
feat(commit): make createTree chunking payload-size aware (#35)
chore: release 0.3.0 (#78)