MCPcopy
hub / github.com/continuedev/continue / resetTimeout

Function resetTimeout

extensions/cli/src/tools/runTerminalCommand.ts:266–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 backgroundSignalManager.on("backgroundRequested", moveToBackground);
265
266 const resetTimeout = () => {
267 if (timeoutId) {
268 clearTimeout(timeoutId);
269 }
270 timeoutId = setTimeout(() => {
271 if (isResolved) return;
272 isResolved = true;
273 child.kill();
274 let output = stdout + (stderr ? `\nStderr: ${stderr}` : "");
275 output += `\n\n[Command timed out after ${TIMEOUT_MS / 1000} seconds of no output]`;
276
277 const truncationResult = truncateOutputFromStart(output, {
278 maxChars,
279 maxLines,
280 });
281 const finalOutput = truncationResult.wasTruncated
282 ? appendParallelLimitNote(truncationResult.output)
283 : truncationResult.output;
284 resolve(finalOutput);
285 }, TIMEOUT_MS);
286 };
287
288 const showCurrentOutput = () => {
289 if (!context?.toolCallId) return;

Callers 4

_initializeSocketMethod · 0.85
onStdoutFunction · 0.85
onStderrFunction · 0.85

Calls 3

truncateOutputFromStartFunction · 0.85
appendParallelLimitNoteFunction · 0.85
killMethod · 0.80

Tested by

no test coverage detected