@jayyuen66/dsh-zvec-grep 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +3 -2
- package/README.zh-CN.md +3 -2
- package/host.js +23 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## 0.1.8
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **`limit` 越界改成点名拒绝,不再静默钳制**(`lib/cli.ts` 的 `clampLimit` 随之更名 `resolveLimit`):`0`、`51`、`999` 一律抛错并报出允许区间(新文案 `limitOutOfRange`,中英双语)。静默钳过的值交回的是一个模型读不出的失真——它请求 999 条、实际拿到 50 条,会把「只有 50 处」当成这次检索的事实;拒绝并点名区间,下一轮它自己把数改对。省略与 `null` 照旧回默认值(那是合法用法),非整数、负数、非数字仍按「必须是非负整数」抛。工具参数说明 `limitDescription`(双语)同步写明越出区间直接报错,模型在第一轮就看到拒绝语义、不必先撞一次错误。命中摘要的 `summaryLimit` 与命令构造引同一个函数,摘要口径仍与实际请求一致。
|
|
10
|
+
- **宿主 `configSchema` 的数值区间改引 `lib/limits.ts` 常量**:`defaultLimit` / `grepBudgetPerSearch` / `unlockWindowMin` 三条的 `.min()/.max()` 此前写的是字面量,本轮换成 `LIMIT_MIN` / `LIMIT_MAX` / `BUDGET_MAX` / `WINDOW_MAX`。取值一个都没动,两份 README 里的区间数字照旧。**顺带纠正 0.1.7 那条声明**——它写着「宿主 schema、命令钳制、卡片显示与输入提示引同一份常量」,实际只落到后三者,schema 侧那三份副本是本轮才收的;写超实现的这句没有门能拦,靠读代码发现。
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **索引锁被非重建操作占用时点名占锁方**(新文案 `lockBusyOtherOperation`,中英双语):`ZVEC_GREP.ENGINE.LOCK.BUSY` 且 `ownerOperation` 不是 `index.rebuild` 时(增量刷新是常见的那一个),原先交回的只有 zg 的原始失败文本,读者分不清「本命令没等这类操作」和「等过之后仍然失败」。现在把点名占锁方、说明为何不排队(这类操作可能跑很久,排队等于无界挂起)那句话放在前面,zg 的原始失败原文随行——证据不吞。回执里缺 `ownerOperation` 时按 `unknown` 点名,不退成一条裸失败。重建占锁照旧走等待重试,两类占锁方不再共用同一条出口。
|
|
15
|
+
|
|
16
|
+
### Not changed, deliberately
|
|
17
|
+
|
|
18
|
+
- **设置卡的数值框仍然钳到边界并在保存条上提示**(`lib/card-logic.ts`),与本条工具侧的拒绝口径不同。人打错一个越界数,钳到边界比让整次保存失败更合人意;模型给的 `limit` 需要的是「这一轮错了」的反馈。两侧读同一组常量,区间不会各说各话。
|
|
19
|
+
|
|
5
20
|
## 0.1.7
|
|
6
21
|
|
|
7
22
|
### Added
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/v/@jayyuen66/dsh-zvec-grep?style=flat-square&logo=npm&logoColor=white" alt="npm version" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/
|
|
11
|
+
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-zvec-grep?style=flat-square" alt="npm downloads (total)" /></a>
|
|
12
12
|
<a href="https://github.com/JayYuen666/dsh-zvec-grep/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-zvec-grep/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
|
|
13
13
|
<img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
|
|
14
14
|
<img src="https://img.shields.io/badge/node-%3E%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
|
|
@@ -114,7 +114,7 @@ If your profile pins `@jayyuen66/dsh-plugin-shared` with a pnpm `overrides` entr
|
|
|
114
114
|
|
|
115
115
|
## <img src="https://api.iconify.design/lucide/search.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Tools exposed to the model
|
|
116
116
|
|
|
117
|
-
Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status); stdout capped at 400000 bytes, truncated to the tail with a note. Sandbox runner failure, policy denial and a genuine zg failure are told apart; incomplete results are flagged. A `root` must be a string, and the constructed command is capped in UTF-8 bytes (not code units): a non-string root or an over-long command is refused instead of falling back to the session workspace or hitting the OS argument limit.
|
|
117
|
+
Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status); stdout capped at 400000 bytes, truncated to the tail with a note. Sandbox runner failure, policy denial and a genuine zg failure are told apart; incomplete results are flagged. A `root` must be a string, and the constructed command is capped in UTF-8 bytes (not code units): a non-string root or an over-long command is refused instead of falling back to the session workspace or hitting the OS argument limit. A `limit` outside 1-50 is refused the same way, naming the allowed range - a silently clamped count would read as the truth about this search; omit it for the default.
|
|
118
118
|
|
|
119
119
|
### zg_search
|
|
120
120
|
|
|
@@ -255,6 +255,7 @@ A "rebuild workspace" run is one **unowned** job in the host's `ctx.jobs` (`kind
|
|
|
255
255
|
| --- | --- |
|
|
256
256
|
| grep/rg refused with "no zg_search has run yet" | The search-first gate; run zg_search. Quota spent or expired - re-search with a sharper query to refresh it, no need to disable the plugin. |
|
|
257
257
|
| Search times out | Default `--refresh wait` refreshes synchronously; narrow with globs/fileTypes, lower the limit, or start the daemon - direct mode cold-loads the embedding model on every call, which is why that budget is 5 minutes. |
|
|
258
|
+
| "the zg index lock is held by another operation (ownerOperation: ...)" | The lock holder is not a rebuild (an index refresh is the usual one), and this command does not wait for it - such an operation can run very long, and queueing behind it would be unbounded. Retry later, or query again once it settles; only a rebuild-owned lock waits and retries automatically. zg's original failure text is appended, so you can read which lock it was. |
|
|
258
259
|
| Rebuild refused with "not in the workspace whitelist" | That directory never had a session in this daemon; start one there first, or let the model call zg_index with confirm=true. |
|
|
259
260
|
| Card reports a failed rebuild although zg looks finished | Success is "completed with exit 0" - exit 127 (zg missing) also lands in completed; read the output tail. |
|
|
260
261
|
| A root that was never indexed | zg_search fails loudly; building happens only via zg_index on an explicit request. |
|
package/README.zh-CN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/v/@jayyuen66/dsh-zvec-grep?style=flat-square&logo=npm&logoColor=white" alt="npm version" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/
|
|
11
|
+
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-zvec-grep?style=flat-square" alt="npm downloads (total)" /></a>
|
|
12
12
|
<a href="https://github.com/JayYuen666/dsh-zvec-grep/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-zvec-grep/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
|
|
13
13
|
<img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
|
|
14
14
|
<img src="https://img.shields.io/badge/node-%3E%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
|
|
@@ -114,7 +114,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
114
114
|
|
|
115
115
|
## <img src="https://api.iconify.design/lucide/search.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 提供给模型的工具
|
|
116
116
|
|
|
117
|
-
输出为纯文本;超时 5 分钟(search)/ 10 分钟(index)/ 60 秒(status);stdout 上限 400000 字节,超限截尾并提示。沙箱 runner 失败、策略拒绝与 zg 自身失败分开归因;结果可能不完整时显式打标。`root` 必须是字符串,构造出的命令按 UTF-8 字节(不是码元)封顶:非字符串的 root
|
|
117
|
+
输出为纯文本;超时 5 分钟(search)/ 10 分钟(index)/ 60 秒(status);stdout 上限 400000 字节,超限截尾并提示。沙箱 runner 失败、策略拒绝与 zg 自身失败分开归因;结果可能不完整时显式打标。`root` 必须是字符串,构造出的命令按 UTF-8 字节(不是码元)封顶:非字符串的 root 与超长命令直接拒绝,不会回落到会话工作区,也不会撞上内核参数上限。`limit` 越出 1-50 同样直接拒绝并点名区间,不静默钳制——钳过的少结果会被模型当成这次检索的事实;省略则用默认值。
|
|
118
118
|
|
|
119
119
|
### zg_search
|
|
120
120
|
|
|
@@ -255,6 +255,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
255
255
|
| --- | --- |
|
|
256
256
|
| grep/rg 被拒且提示「尚未执行过 zg_search」 | 这是 search-first 门禁,先 zg_search;配额用尽或过期同理,换个更准的 query 重搜续上,不必关插件。 |
|
|
257
257
|
| 检索超时 | 默认 `--refresh wait` 同步刷新索引;用 globs/fileTypes 缩小范围、调小 limit,或起守护进程——直连模式每次冷加载 embedding 模型,那才是预算给到 5 分钟的原因。 |
|
|
258
|
+
| 报错「zg 索引锁正被其他操作占用(ownerOperation: …)」 | 占锁方不是重建(常见是增量刷新),这一条命令不为它等待——那类操作可能跑很久,排队等于无界挂起。稍后重试,或等它落定后再查;只有重建占锁走自动等待重试。zg 的原始失败文本随行,可核对是哪一把锁。 |
|
|
258
259
|
| 重建被拒「root 不在观测白名单内」 | 该目录从未在本 daemon 开过会话;先在那里起会话,或让模型带 confirm=true 调 zg_index。 |
|
|
259
260
|
| 卡片显示重建失败而 zg 看着像跑完了 | 成功判据是 completed 且 exit 0——exit 127(zg 没装)也落在 completed,看输出尾部。 |
|
|
260
261
|
| 从未建索引的 root | zg_search 明确报错;建索引只在明确请求时由 zg_index 做。 |
|
package/host.js
CHANGED
|
@@ -105,7 +105,7 @@ const MESSAGES = {
|
|
|
105
105
|
ftsDescription: "词法查询组(如标识符、报错串)",
|
|
106
106
|
vectorDescription: "纯语义查询组",
|
|
107
107
|
fuseDescription: "融合所有组为单一排名",
|
|
108
|
-
limitDescription: "每组最大条数 1-50,默认 10",
|
|
108
|
+
limitDescription: "每组最大条数 1-50,默认 10;越出区间直接报错",
|
|
109
109
|
previewDescription: "每条命中带的源码片段大小:none 只给锚点行、short 给锚点加一段有界上下文、full 给整段源码。默认 short",
|
|
110
110
|
refreshDescription: "检索前如何刷新索引:wait 等刷新到最新(默认)、off 不刷新、background 交给守护进程后台刷新。background 只在守护进程就绪时可用:没有守护进程时这一档在命令构造前就被拒绝(直连模式下 zg 只会静默关掉刷新并留一行 stderr warning,那等于把「没刷新」说成「后台在刷」),要它请先在终端执行 `zg server on`",
|
|
111
111
|
globsDescription: "路径 glob(如 src/**),单个字符串或数组",
|
|
@@ -161,6 +161,7 @@ const MESSAGES = {
|
|
|
161
161
|
abortedFailure: "zg 执行被中止",
|
|
162
162
|
rebuildWaitTimeout: "等待 {root} 的重建完成超时(约 {seconds} 秒),重建可能仍在进行;请稍后重试。本次不会发放 grep/rg 配额——重建期间索引不可读,先等它结束。",
|
|
163
163
|
rebuildWaitAborted: "等待 {root} 的重建完成时被中止。",
|
|
164
|
+
lockBusyOtherOperation: "zg 索引锁正被其他操作占用(ownerOperation: {op}),本命令没有等待它结束:这类操作(如索引刷新)可能耗时很久,稍后重试或等它落定后再查",
|
|
164
165
|
statusRebuilding: "{root} 正在重建中(作业 {jobId})。重建期间索引不可读,检索会自动等待它完成后重试。如需查看实时输出,请在设置卡的工作区重建面板里观察。此刻即使问「索引是否就绪」也是否定的答案——重建落定后再问。",
|
|
165
166
|
statusNotReady: "[zvec-grep] {root} 的索引**未就绪**(上面是 zg 的完整就绪报告)。这不是执行失败,而是 checkReady=true 要的那个结论:{detail} 若刷新反复失败(报告里出现 `read only mode` 一类写入被拒的措辞),那是该索引自身的状态问题,重建即可恢复:zg_index(root=\"…\", confirm=true, rebuild=true)。",
|
|
166
167
|
checkReadyDescription: "就绪判定:就绪报告照常给出,另行判定索引是否 ready 并在结论里明说。未就绪不是执行失败,报告仍会返回",
|
|
@@ -223,6 +224,7 @@ const MESSAGES = {
|
|
|
223
224
|
rootIsFsRoot: "root 不能是文件系统根目录 /",
|
|
224
225
|
rootRequiredWithFallback: "root 必填,且为工作区绝对路径(可省略:缺省为当前会话工作区)",
|
|
225
226
|
limitInvalid: "limit 必须是非负整数(省略则用默认值)",
|
|
227
|
+
limitOutOfRange: "limit 超出允许范围 {min}–{max}(省略则用默认值)",
|
|
226
228
|
mustBeStringArray: "{name} 必须是字符串数组",
|
|
227
229
|
tooManyItems: "{name} 最多 {maxItems} 项(实际 {actual})",
|
|
228
230
|
nonStringItem: "{name} 含非字符串项({received})",
|
|
@@ -259,7 +261,7 @@ const MESSAGES = {
|
|
|
259
261
|
ftsDescription: "Lexical query groups (identifiers, error strings)",
|
|
260
262
|
vectorDescription: "Purely semantic query groups",
|
|
261
263
|
fuseDescription: "Fuse all groups into a single ranking",
|
|
262
|
-
limitDescription: "Max hits per group, 1-50, default 10",
|
|
264
|
+
limitDescription: "Max hits per group, 1-50, default 10; a value outside that range is refused",
|
|
263
265
|
previewDescription: "How much source each hit carries: none anchor line only, short anchor plus a bounded context window, full the whole chunk. Default short",
|
|
264
266
|
refreshDescription: "How the index is refreshed before searching: wait refreshes to the latest (default), off does not refresh, background hands it to the daemon. background needs a ready daemon: without one it is refused before the command is built (in direct mode zg silently turns refreshing off and leaves one stderr warning, which would report \"refreshing in the background\" when nothing refreshes) — run `zg server on` in a terminal to get it",
|
|
265
267
|
globsDescription: "Path globs (e.g. src/**), a single string or an array",
|
|
@@ -315,6 +317,7 @@ const MESSAGES = {
|
|
|
315
317
|
abortedFailure: "zg execution was aborted",
|
|
316
318
|
rebuildWaitTimeout: "timed out after about {seconds}s waiting for the rebuild of {root}; it may still be running. Retry later. No grep/rg quota is granted: the index is unreadable while the rebuild runs.",
|
|
317
319
|
rebuildWaitAborted: "aborted while waiting for the rebuild of {root} to finish",
|
|
320
|
+
lockBusyOtherOperation: "the zg index lock is held by another operation (ownerOperation: {op}); this command did not wait for it: such operations (e.g. an index refresh) can run very long — retry later, or query again once it settles",
|
|
318
321
|
statusRebuilding: "{root} is being rebuilt (job {jobId}). The index is unreadable while the rebuild runs; searches wait for it to finish and retry. Watch live output in the settings card rebuild panel. Asking whether the index is ready right now would get a negative answer anyway — ask again once the rebuild settles.",
|
|
319
322
|
statusNotReady: "[zvec-grep] the index for {root} is **not ready** (the full zg readiness report is above). This is not an execution failure, it is the conclusion checkReady=true asked for: {detail} If refreshes keep failing (wording like `read only mode` means writes are refused), that is the index's own state — rebuild it to recover: zg_index(root=\"…\", confirm=true, rebuild=true).",
|
|
320
323
|
checkReadyDescription: "Readiness verdict: the readiness report is still returned, and the tool additionally states whether the index is ready. Not-ready is not an execution failure — the report still comes back",
|
|
@@ -377,6 +380,7 @@ const MESSAGES = {
|
|
|
377
380
|
rootIsFsRoot: "root must not be the filesystem root /",
|
|
378
381
|
rootRequiredWithFallback: "root is required and must be an absolute workspace path (it may be omitted: defaults to the current session workspace)",
|
|
379
382
|
limitInvalid: "limit must be a non-negative integer (omit it to use the default)",
|
|
383
|
+
limitOutOfRange: "limit is out of the allowed range {min}–{max} (omit it to use the default)",
|
|
380
384
|
mustBeStringArray: "{name} must be an array of strings",
|
|
381
385
|
tooManyItems: "{name} allows at most {maxItems} items (actual {actual})",
|
|
382
386
|
nonStringItem: "{name} contains a non-string item ({received})",
|
|
@@ -684,16 +688,22 @@ function resolveRoot(value, fallback, messages) {
|
|
|
684
688
|
throw new Error(messages.rootRequiredWithFallback);
|
|
685
689
|
}
|
|
686
690
|
/**
|
|
687
|
-
* limit
|
|
691
|
+
* limit 取值:省略(undefined/null)回默认;不是非负整数即抛;越界拒绝并点名区间。
|
|
688
692
|
*
|
|
689
693
|
* 类型只认 number:`Number()` 会把 `true` 折成 1、把 `[]` 折成 0——模型给一个类型错的 limit
|
|
690
|
-
*
|
|
694
|
+
* 就会静默只回一条结果,而它会把「只有一处命中」当成这次检索的事实。越界同样拒绝而不是
|
|
695
|
+
* 钳制:静默钳过的 limit 让模型以为要回了 999 条、实际只看到 50 条,还把「少」当成了事实;
|
|
696
|
+
* 拒绝并报区间,下一轮它自己改对。
|
|
691
697
|
*/
|
|
692
|
-
function
|
|
698
|
+
function resolveLimit(value, messages, fallback = 10) {
|
|
693
699
|
if (value === void 0 || value === null) return fallback;
|
|
694
700
|
if (typeof value !== "number") throw new TypeError(messages.limitInvalid);
|
|
695
701
|
if (!Number.isSafeInteger(value) || value < 0) throw new Error(messages.limitInvalid);
|
|
696
|
-
|
|
702
|
+
if (value < 1 || value > 50) throw new Error(fill(messages.limitOutOfRange, {
|
|
703
|
+
min: 1,
|
|
704
|
+
max: 50
|
|
705
|
+
}));
|
|
706
|
+
return value;
|
|
697
707
|
}
|
|
698
708
|
/** 检索类数组(queries/fts/vector)取值:条数与单条长度都放宽到 query 档。 */
|
|
699
709
|
function queryList(value, name, messages) {
|
|
@@ -781,7 +791,7 @@ function buildIndexedCommand(args, root, messages, mode, backgroundSupport) {
|
|
|
781
791
|
const refresh = refreshOf(args.refresh, messages);
|
|
782
792
|
if (refresh === "background" && backgroundSupport === "daemon-down") throw new Error(fill(messages.refreshBackgroundNeedsServer, { root }));
|
|
783
793
|
if (refresh === "background" && backgroundSupport === "mode-direct") throw new Error(fill(messages.refreshBackgroundPinnedDirect, { root }));
|
|
784
|
-
parts.push("--limit", String(
|
|
794
|
+
parts.push("--limit", String(resolveLimit(args.limit, messages)), "--preview", previewOf(args.preview, messages), "--refresh", refresh);
|
|
785
795
|
pushSearchGlobs(parts, args, messages);
|
|
786
796
|
if (boolOf(args.preferSymbol, "preferSymbol", messages)) parts.push("--prefer-symbol");
|
|
787
797
|
if (boolOf(args.trace, "trace", messages)) parts.push("--trace");
|
|
@@ -826,7 +836,7 @@ function buildExhaustiveCommand(args, root, messages, mode) {
|
|
|
826
836
|
if (pattern.length === 0) throw new Error(messages.exhaustiveNeedsPattern);
|
|
827
837
|
if (pattern.startsWith("-")) parts.push("-e", shq(pattern));
|
|
828
838
|
else parts.push(shq(pattern));
|
|
829
|
-
parts.push("--limit", String(
|
|
839
|
+
parts.push("--limit", String(resolveLimit(args.limit, messages)));
|
|
830
840
|
pushPathFilters(parts, args, messages);
|
|
831
841
|
pushTimeFilters(parts, args, messages);
|
|
832
842
|
parts.push(deviceFlag(args.device, messages), modeFlag(mode));
|
|
@@ -2971,7 +2981,9 @@ async function runForegroundOnce(host, command, workdir, timeoutMs, opts) {
|
|
|
2971
2981
|
const resolved = opts.resolveFailure?.(failure, result) ?? null;
|
|
2972
2982
|
if (resolved !== null) return resolved;
|
|
2973
2983
|
const concurrent = classifyConcurrentFailure(result.stderr.text);
|
|
2974
|
-
|
|
2984
|
+
if (concurrent?.kind === "lock-busy" && concurrent.rebuild) throw new RebuildLockBusyError(failure);
|
|
2985
|
+
if (concurrent?.kind === "lock-busy") throw new Error(`${fill(opts.messages.lockBusyOtherOperation, { op: concurrent.ownerOperation ?? "unknown" })}\n${failure}`);
|
|
2986
|
+
throw new Error(failure);
|
|
2975
2987
|
}
|
|
2976
2988
|
const notes = successNotes(result, opts.messages, opts.stdoutMaxBytes);
|
|
2977
2989
|
const { text } = result.stdout;
|
|
@@ -3030,7 +3042,7 @@ function assertRootExists(root, messages) {
|
|
|
3030
3042
|
}
|
|
3031
3043
|
/**
|
|
3032
3044
|
* 默认每组结果数:值域 1-50 由 Config schema(隐式命名空间与行 config 共用)保证,
|
|
3033
|
-
*
|
|
3045
|
+
* 这里只处理「字段缺省」。越界的拒绝在 cli.resolveLimit(命令构造边界),不在此重复。
|
|
3034
3046
|
*/
|
|
3035
3047
|
function readDefaultLimit(config) {
|
|
3036
3048
|
return config.defaultLimit.get() ?? 10;
|
|
@@ -3576,7 +3588,7 @@ async function runSearchTool(runtime, args, exec, messages) {
|
|
|
3576
3588
|
env: zgEnv(config),
|
|
3577
3589
|
stdoutMaxBytes: config.stdoutMaxBytes,
|
|
3578
3590
|
messages,
|
|
3579
|
-
summaryLimit:
|
|
3591
|
+
summaryLimit: resolveLimit(searchArgs.limit, messages),
|
|
3580
3592
|
rebuildWait: {
|
|
3581
3593
|
root: resolvedRoot,
|
|
3582
3594
|
rebuilds: runtime.rebuilds,
|