refactor(coding-agent/tools): standardized search tool parameters across find and grep
- Renamed `head_limit` to `limit` in grep and find tools for consistency. - Added `context` as optional alias for the `c` parameter in grep. - Made hidden files inclusion configurable in find with `hidden` parameter. - Integrated .gitignore and .ignore file support in find tool. - Updated plan mode documentation for self-contained plan files.
This commit is contained in:
@@ -172,10 +172,8 @@ export class PythonTool implements AgentTool<typeof pythonSchema> {
|
||||
}
|
||||
|
||||
const { cells, timeout: rawTimeout = 30, cwd, reset } = params;
|
||||
// Auto-convert milliseconds to seconds if value > 1000 (16+ min is unreasonable)
|
||||
let timeoutSec = rawTimeout > 1000 ? rawTimeout / 1000 : rawTimeout;
|
||||
// Clamp to reasonable range: 1s - 600s (10 min)
|
||||
timeoutSec = Math.max(1, Math.min(600, timeoutSec));
|
||||
const timeoutSec = Math.max(1, Math.min(600, rawTimeout));
|
||||
const timeoutMs = timeoutSec * 1000;
|
||||
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
||||
const combinedSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
||||
|
||||
Reference in New Issue
Block a user