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
Consolidate the four grep-output truncation implementations into one
Grep results passed through both ripgrep-plugin's line cap and
rg-output's byte cap on the way in, then result-truncation-plugin's
character cap on the way out, each with its own wording. Whenever more
than one of those caps actually fired on the same result, the notices
concatenated (or one silently clobbered another), so the model would
sometimes see two differently-worded "truncated" notices, or a
mangled fragment of one.
result-truncation-plugin.ts's truncateToolResultContent is now the
only place that attaches a truncation notice; it takes an optional
threshold so other callers can reuse the same wording at a different
cap size. The grep-specific cappers (rg-output's byte-cap breach,
ripgrep-plugin's line-count cap) now trim silently and rely on that
final pass to report the truncation once. bounded-grep-fallback's own
byte-cap loop is removed outright — ripgrep-plugin's boundedContent
already re-checks the fallback walker's output against the same
byte-cap primitive downstream, making the fallback's own pass
redundant. rg-output's timeout notice is untouched, since a run
timing out is a different, non-redundant fact from output being
oversized.
0 commit comments