@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
14 lines • 462 B
JavaScript
import { isStaleExtensionContextError } from "../goal/stale-context.js";
/** Deferred terminal callbacks stop using a retired generation; other failures remain visible. */
export function withTerminalContext(callback, retire) {
try {
return callback();
}
catch (error) {
if (!isStaleExtensionContextError(error))
throw error;
retire();
return undefined;
}
}
//# sourceMappingURL=context-lifetime.js.map