INNER CODE UNIT · TypeScript
readResultsFromTempFile
Dakkshin/after-effects-mcp · src/index.ts:39
function readResultsFromTempFile(): string {
try {
const tempFilePath = path.join(getAETempDir(), 'ae_mcp_result.json');
// Add debugging info
console.error(`Checking for results at: ${tempFilePath}`);
if (fs.existsSync(tempFilePath)) {
// Get file stats to check modification time
const stats = fs.statSync(tempFilePath);
console.error(`Result file exists, last modified: ${stats.mtime.toISOString()}`);
const content = fs.readFileSync(tempFilePath, 'utf8');
console.error(`Result file content length: ${content.length} bytes`);
// If the result file is older than 30 seconds, warn the user
const thirtySecondsAgo = new Date(Date.now() - 30 * 1000);
if (stats.mtime < thirtySecondsAgo) {