feat: add workflow management commands and utilities

- Implemented workflow installation, listing, and syncing commands in `workflow.ts`.
- Created utility functions for project root detection and package version retrieval in `project-root.ts`.
- Added update checker functionality to notify users of new package versions in `update-checker.ts`.
- Developed unit tests for project root utilities and update checker to ensure functionality and version comparison accuracy.
This commit is contained in:
catlog22
2026-01-21 12:35:33 +08:00
parent ffe9898fd3
commit 9d6bc92837
13 changed files with 1832 additions and 5 deletions

View File

@@ -113,8 +113,20 @@ export function updateActiveExecution(event: {
activeExec.output += output;
}
} else if (type === 'completed') {
// Remove from active executions
activeExecutions.delete(executionId);
// Mark as completed instead of immediately deleting
// Keep execution visible for 5 minutes to allow page refreshes to see it
const activeExec = activeExecutions.get(executionId);
if (activeExec) {
activeExec.status = success ? 'completed' : 'error';
// Auto-cleanup after 5 minutes
setTimeout(() => {
activeExecutions.delete(executionId);
console.log(`[ActiveExec] Auto-cleaned completed execution: ${executionId}`);
}, 5 * 60 * 1000);
console.log(`[ActiveExec] Marked as ${activeExec.status}, will auto-clean in 5 minutes`);
}
}
}