@blockrun/runcode 2.5.5 → 2.5.6
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/dist/agent/optimize.js +3 -3
- package/dist/tools/grep.js +3 -3
- package/package.json +1 -1
package/dist/agent/optimize.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* 5. Pre-compact stripping — remove images/docs before summarization
|
|
10
10
|
*/
|
|
11
11
|
// ─── Constants ─────────────────────────────────────────────────────────────
|
|
12
|
-
/** Max chars per individual tool result before truncation */
|
|
13
|
-
const MAX_TOOL_RESULT_CHARS =
|
|
12
|
+
/** Max chars per individual tool result before truncation (history-level safety net) */
|
|
13
|
+
const MAX_TOOL_RESULT_CHARS = 32_000;
|
|
14
14
|
/** Max aggregate tool result chars per user message */
|
|
15
|
-
const MAX_TOOL_RESULTS_PER_MESSAGE_CHARS =
|
|
15
|
+
const MAX_TOOL_RESULTS_PER_MESSAGE_CHARS = 100_000;
|
|
16
16
|
/** Preview size when truncating */
|
|
17
17
|
const PREVIEW_CHARS = 2_000;
|
|
18
18
|
/** Default max_tokens (low to save output slot reservation) */
|
package/dist/tools/grep.js
CHANGED
|
@@ -64,8 +64,8 @@ function runRipgrep(opts, searchPath, mode, limit) {
|
|
|
64
64
|
args.push('-U', '--multiline-dotall');
|
|
65
65
|
if (opts.glob)
|
|
66
66
|
args.push(`--glob=${opts.glob}`);
|
|
67
|
-
// Always exclude common noise
|
|
68
|
-
args.push('--glob=!node_modules', '--glob=!.git', '--glob=!dist');
|
|
67
|
+
// Always exclude common noise + lock files (huge, rarely useful)
|
|
68
|
+
args.push('--glob=!node_modules', '--glob=!.git', '--glob=!dist', '--glob=!*.lock', '--glob=!package-lock.json', '--glob=!pnpm-lock.yaml');
|
|
69
69
|
args.push('--', opts.pattern);
|
|
70
70
|
args.push(searchPath);
|
|
71
71
|
try {
|
|
@@ -118,7 +118,7 @@ function runNativeGrep(opts, searchPath, mode, limit) {
|
|
|
118
118
|
.replace(/\*\*/, '*'); // Convert ** to * for flat matching
|
|
119
119
|
args.push(`--include=${nativeGlob}`);
|
|
120
120
|
}
|
|
121
|
-
args.push('--exclude-dir=node_modules', '--exclude-dir=.git', '--exclude-dir=dist');
|
|
121
|
+
args.push('--exclude-dir=node_modules', '--exclude-dir=.git', '--exclude-dir=dist', '--exclude=*.lock', '--exclude=package-lock.json', '--exclude=pnpm-lock.yaml');
|
|
122
122
|
args.push('-e', opts.pattern, searchPath);
|
|
123
123
|
try {
|
|
124
124
|
const result = execFileSync('grep', args, {
|