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
fix(copilot): let a read placeholder carry its own kind instead of sniffing its text
Three rounds of review found the same defect in three places: a gate matching a
prefix no producer emitted so it never fired, a real file misread as a refusal, a
filename newline hiding a refusal. Each fix tightened the text matching and the
next round found another way the text was the wrong thing to trust.
So stop trusting it. `readPlaceholder.*` now returns the whole read result —
content, totalLines, and a `placeholder` kind — and the two classifiers read the
kind. A producer cannot emit a placeholder without tagging it, and no amount of
user content can imitate one, so both failure directions are gone by construction
rather than by a better pattern.
`oversized` (the four size refusals) is reported as a tool error; `unreadable`
(undecodable, binary, unparseable) is returned as content. The type flows through
FileReadResult and ReadResult, so the compiler checks the tag survives to the
gates rather than leaving a silent drop to be discovered later.
Also removes the totalLines-of-1 heuristic, which was only ever a proxy for this.
: 'Read result too large to return inline. Use grep with a more specific pattern or narrower path to locate the relevant section, then retry read with offset/limit. Avoid catch-all greps or full-file reads because they waste context window.',
417
417
}
@@ -459,7 +459,7 @@ export async function executeVfsRead(
0 commit comments