MCPcopy Index your code
hub / github.com/simstudioai/sim / isNonGreppablePlaceholder

Function isNonGreppablePlaceholder

apps/sim/lib/copilot/vfs/operations.ts:45–50  ·  view source on GitHub ↗

* True when file content is one of `readFileRecord`'s non-text placeholders * (binary, unparseable, or over the inline read cap) — these carry no searchable * content, so grepping them should report the placeholder instead.

(content: string, totalLines: number)

Source from the content-addressed store, hash-verified

43 * content, so grepping them should report the placeholder instead.
44 */
45function isNonGreppablePlaceholder(content: string, totalLines: number): boolean {
46 if (totalLines !== 1) return false
47 return /^\[(File too large|Image too large|Document too large|Could not parse|Binary file|Compiled artifact too large)/.test(
48 content.trim()
49 )
50}
51
52/**
53 * Run a single-file content grep over an already-resolved file read result,

Callers 1

grepReadResultFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected