csharpdeeb25a2 | 1 | #nullable enable |
| 2 | using CascadeIDE.Features.Search.DataAcquisition; |
| 3 | using CascadeIDE.Features.Shell.Application; |
| 4 | using CascadeIDE.Services; |
| 5 | |
| 6 | namespace CascadeIDE.Features.Search.Application; |
| 7 | |
| 8 | internal sealed class RipgrepCommandPaletteGoToSearchBackend : ICommandPaletteGoToSearchBackend |
| 9 | { |
| 10 | public Task<(IReadOnlyList<RipgrepWorkspaceMatch> Matches, string? Error)> SearchMatchesAsync( |
| 11 | GoToAllQuery query, |
| 12 | string workspaceRoot, |
| 13 | string? _solutionPath, |
| 14 | int maxMatches, |
| 15 | string? rgExecutable, |
| 16 | CancellationToken cancellationToken) |
| 17 | { |
| 18 | var (pattern, fixedString, glob) = GoToPaletteRipgrepPatternBuilder.Build(query); |
| 19 | return RipgrepWorkspaceSearchService.SearchMatchesAsync( |
| 20 | workspaceRoot, |
| 21 | pattern, |
| 22 | subPath: null, |
| 23 | fixedString, |
| 24 | glob, |
| 25 | maxMatches, |
| 26 | rgExecutable, |
| 27 | cancellationToken); |
| 28 | } |
| 29 | } |
| 30 | |
View only · write via MCP/CIDE