@@ -178,13 +178,35 @@ type SemidiffFile struct {
178178 Removed []string `json:"removed"`
179179}
180180
181- // SearchContentOptions configures a content search request.
181+ // SearchContentOptions configures a content search request (mirrors Rust SearchOptions) .
182182type SearchContentOptions struct {
183- Literal bool `json:"literal,omitempty"`
184- CaseSensitive * bool `json:"caseSensitive,omitempty"` // default true
185- ContextLines int `json:"contextLines,omitempty"`
186- MaxResults int `json:"maxResults,omitempty"`
187- FileGlob string `json:"fileGlob,omitempty"`
183+ Literal bool `json:"literal,omitempty"`
184+ CaseSensitive * bool `json:"caseSensitive,omitempty"` // default true
185+ ContextLines int `json:"contextLines,omitempty"`
186+ BeforeContext int `json:"beforeContext,omitempty"`
187+ AfterContext int `json:"afterContext,omitempty"`
188+ MaxResults int `json:"maxResults,omitempty"`
189+ FileGlob string `json:"fileGlob,omitempty"`
190+ ExcludeGlob string `json:"excludeGlob,omitempty"`
191+ ExtraPatterns []string `json:"extraPatterns,omitempty"`
192+ InvertMatch bool `json:"invertMatch,omitempty"`
193+ WordRegexp bool `json:"wordRegexp,omitempty"`
194+ OnlyMatching bool `json:"onlyMatching,omitempty"`
195+ FilesWithMatches bool `json:"filesWithMatches,omitempty"`
196+ FilesWithoutMatch bool `json:"filesWithoutMatch,omitempty"`
197+ CountOnly bool `json:"countOnly,omitempty"`
198+ NoIgnore bool `json:"noIgnore,omitempty"`
199+ SearchPath string `json:"searchPath,omitempty"`
200+ }
201+
202+ // FindOptions configures a file-find request (mirrors Rust FindOptions).
203+ type FindOptions struct {
204+ ModifiedSinceSecs * uint64 `json:"modifiedSinceSecs,omitempty"`
205+ NewerThan string `json:"newerThan,omitempty"`
206+ MinSizeBytes * uint64 `json:"minSizeBytes,omitempty"`
207+ MaxSizeBytes * uint64 `json:"maxSizeBytes,omitempty"`
208+ MaxDepth * int `json:"maxDepth,omitempty"`
209+ NoIgnore bool `json:"noIgnore,omitempty"`
188210}
189211
190212// ContextLine is one line of before/after context around a search match.
@@ -198,23 +220,34 @@ type ContentMatch struct {
198220 Path string `json:"path"`
199221 LineNumber int `json:"lineNumber"`
200222 Line string `json:"line"`
223+ MatchedTexts []string `json:"matchedTexts,omitempty"`
201224 BeforeContext []ContextLine `json:"beforeContext,omitempty"`
202225 AfterContext []ContextLine `json:"afterContext,omitempty"`
203226}
204227
228+ // FileCount holds the match count for one file (count_only mode).
229+ type FileCount struct {
230+ Path string `json:"path"`
231+ Count int `json:"count"`
232+ }
233+
205234// SearchResult is returned by SearchContent.
206235type SearchResult struct {
207- Matches []ContentMatch `json:"matches"`
208- TotalMatches int `json:"totalMatches"`
209- FilesSearched int `json:"filesSearched"`
210- Truncated bool `json:"truncated"`
236+ Matches []ContentMatch `json:"matches"`
237+ TotalMatches int `json:"totalMatches"`
238+ FilesSearched int `json:"filesSearched"`
239+ Truncated bool `json:"truncated"`
240+ FilesWithMatches []string `json:"filesWithMatches,omitempty"`
241+ FilesWithoutMatch []string `json:"filesWithoutMatch,omitempty"`
242+ FileCounts []FileCount `json:"fileCounts,omitempty"`
211243}
212244
213245// FindFile is one file returned by FindFiles.
214246type FindFile struct {
215247 Path string `json:"path"`
216248 Language * string `json:"language,omitempty"`
217249 SizeBytes uint64 `json:"sizeBytes"`
250+ Modified * string `json:"modified,omitempty"`
218251}
219252
220253// FindResult is returned by FindFiles.
0 commit comments