fix: increase URI overhead buffer to fix failing tests

Increase overhead calculation from 50 to 100 bytes to account for
VS Code's URI encoding overhead. This ensures truncated URIs stay
within the safe length limit during platform unit tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hannesrudolph 2025-06-11 21:42:41 -06:00
parent 5b8d1721cc
commit ed73805f31

View file

@ -24,7 +24,7 @@ export function createSafeContentUri(scheme: string, path: string, content: stri
}
// Calculate available space for content after accounting for URI overhead
const overhead = baseUri.length + 50 // Extra buffer for URI encoding
const overhead = baseUri.length + 100 // Extra buffer for URI encoding and VS Code overhead
const maxBase64Length = Math.max(0, MAX_SAFE_URI_LENGTH - overhead)
// Truncate content to fit within safe URI length