fix(core): bound default search results (#37154)
This commit is contained in:
parent
ec8ee60e0b
commit
b6ccb66610
5 changed files with 40 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ export const Input = Schema.Struct({
|
|||
description: "Relative directory to search. Defaults to the active Location.",
|
||||
}),
|
||||
limit: FileSystem.GlobInput.fields.limit.annotate({
|
||||
description: "Maximum results to return",
|
||||
description: `Maximum results to return (default: ${FileSystem.DEFAULT_SEARCH_LIMIT})`,
|
||||
}),
|
||||
})
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ export const Plugin = {
|
|||
.glob({
|
||||
cwd,
|
||||
pattern: input.pattern,
|
||||
limit: input.limit ?? Number.MAX_SAFE_INTEGER,
|
||||
limit: input.limit ?? FileSystem.DEFAULT_SEARCH_LIMIT,
|
||||
})
|
||||
.pipe(
|
||||
Effect.map((result) =>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export const Input = Schema.Struct({
|
|||
description: 'File glob to include in the search (for example, "*.js" or "*.{ts,tsx}")',
|
||||
}),
|
||||
limit: FileSystem.GrepInput.fields.limit.annotate({
|
||||
description: "Maximum matches to return",
|
||||
description: `Maximum matches to return (default: ${FileSystem.DEFAULT_SEARCH_LIMIT})`,
|
||||
}),
|
||||
})
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ export const Plugin = {
|
|||
pattern: input.pattern,
|
||||
file: info?.type === "File" ? path.basename(target) : undefined,
|
||||
include: input.include,
|
||||
limit: input.limit ?? Number.MAX_SAFE_INTEGER,
|
||||
limit: input.limit ?? FileSystem.DEFAULT_SEARCH_LIMIT,
|
||||
})
|
||||
.pipe(
|
||||
Effect.map((result) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue