* Render a `source-grep` text block from the CLI. Mirrors * `sourceSearchText` — CLI owns the formatting and the absolute-path * scrubbing, so the plugin doesn't reinvent ripgrep orchestration. * * `surfaceErrors` is on so an unknown `--repo` id (or any other * CLI-side validation fai
(
pattern: string,
opts?: { repo?: string; include?: string; limit?: number },
)
| 531 | * collapsing to a misleading null. |
| 532 | */ |
| 533 | async sourceGrepText( |
| 534 | pattern: string, |
| 535 | opts?: { repo?: string; include?: string; limit?: number }, |
| 536 | ): Promise<string | null> { |
| 537 | const args = ["source-grep", pattern] |
| 538 | if (opts?.repo) args.push("--repo", opts.repo) |
| 539 | if (opts?.include) args.push("--include", opts.include) |
| 540 | if (opts?.limit) args.push("--limit", String(opts.limit)) |
| 541 | return this.run(args, { surfaceErrors: true }) |
| 542 | } |
| 543 | |
| 544 | // ------------------------------------------------------------------- |
| 545 | // Augment |
no test coverage detected