MCPcopy Create free account
hub / github.com/JordanCoin/codemap / defaultBlastRadiusLimits

Function defaultBlastRadiusLimits

blast_radius.go:330–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

328func (e *blastRadiusDiffError) Unwrap() error { return e.err }
329
330func defaultBlastRadiusLimits() blastRadiusLimits {
331 return blastRadiusLimits{
332 MaxTotalChars: envInt("CODEMAP_BLAST_MAX_TOTAL_CHARS", 24000),
333 MaxChangedFiles: envInt("CODEMAP_BLAST_MAX_CHANGED_FILES", 20),
334 MaxAffected: envInt("CODEMAP_BLAST_MAX_AFFECTED", 12),
335 MaxContext: envInt("CODEMAP_BLAST_MAX_CONTEXT", 8),
336 MaxSnippets: envInt("CODEMAP_BLAST_MAX_SNIPPETS", 8),
337 MaxSnippetsPerChanged: envInt("CODEMAP_BLAST_MAX_SNIPPETS_PER_CHANGED", 2),
338 SnippetRadius: envInt("CODEMAP_BLAST_SNIPPET_RADIUS", 2),
339 MaxSnippetChars: envInt("CODEMAP_BLAST_MAX_SNIPPET_CHARS", 700),
340 MaxDiffChars: envInt("CODEMAP_BLAST_MAX_DIFF_CHARS", 8000),
341 MaxDepsChars: envInt("CODEMAP_BLAST_MAX_DEPS_CHARS", 5000),
342 MaxImportersChars: envInt("CODEMAP_BLAST_MAX_IMPORTERS_CHARS", 6000),
343 MaxImporterFiles: envInt("CODEMAP_BLAST_MAX_IMPORTER_FILES", 8),
344 MaxImportersPerFile: envInt("CODEMAP_BLAST_MAX_IMPORTERS_PER_FILE", 12),
345 }
346}
347
348func envInt(key string, fallback int) int {
349 raw := strings.TrimSpace(os.Getenv(key))

Callers 1

Calls 1

envIntFunction · 0.85

Tested by

no test coverage detected