mirror of
https://github.com/lukaszraczylo/filepuff-mcp.git
synced 2026-10-12 04:54:27 +00:00
fix(search): drop redundant truncation prose when cursor present
When a pagination cursor footer is emitted it already reports the remaining count; the separate '(truncated, showing subset of N)' prose line duplicated that signal. Suppress the prose line when CursorLine is set; keep it for non-paginated truncation.
This commit is contained in:
@@ -394,7 +394,9 @@ func (s *Searcher) FormatResultsWithOptions(results *SearchResults, opts FormatO
|
||||
fmt.Fprintf(&sb, " (truncated, total: %d)", results.Total)
|
||||
}
|
||||
sb.WriteString(":\n\n")
|
||||
} else if results.Truncated {
|
||||
} else if results.Truncated && opts.CursorLine == "" {
|
||||
// When a cursor footer is present it already reports the remaining count,
|
||||
// so the prose truncation line would be redundant.
|
||||
fmt.Fprintf(&sb, "(truncated, showing subset of %d total matches)\n\n", results.Total)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user