feat(fs): add a search render-intent card for grep and glob results

grep and glob returned only model-facing text; the structured matches/paths
never reached the client. Add a card:'search' result view with a kind
discriminant ('matches' grouped by file for grep, 'paths' for glob), projected
through each tool's output.presentationMeta and read back in presentResult. The
projections re-apply the same inline cap and per-line budget as the render text
and report total + truncated, so a UI never presents a capped page as complete.
A UI without the search card falls back to content; the TUI is unchanged. The
web consumer is a follow-up.
This commit is contained in:
Chinesezjc
2026-07-30 17:03:54 +08:00
parent 69214b4708
commit 3e22adab28
14 changed files with 628 additions and 12 deletions

View File

@@ -82,6 +82,11 @@ export type {
GenericResultView,
TerminalResultView,
DiffResultView,
SearchResultView,
SearchMatchesResultView,
SearchPathsResultView,
SearchFileMatches,
SearchLineMatch,
} from './presentation.ts'
declare module 'cordis' {