mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
- Refactored spec regeneration status tracking to support multiple projects using a Map for running states and abort controllers. - Updated `getSpecRegenerationStatus` to accept a project path, allowing retrieval of status specific to a project. - Modified `setRunningState` to manage running states and abort controllers per project. - Adjusted related route handlers to utilize project-specific status checks and updates. - Introduced a new Graph View page and integrated it into the routing structure. - Enhanced UI components to reflect the current project’s spec generation state.
19 lines
610 B
TypeScript
19 lines
610 B
TypeScript
/**
|
|
* GET /status endpoint - Get generation status
|
|
*/
|
|
|
|
import type { Request, Response } from 'express';
|
|
import { getSpecRegenerationStatus, getErrorMessage } from '../common.js';
|
|
|
|
export function createStatusHandler() {
|
|
return async (req: Request, res: Response): Promise<void> => {
|
|
try {
|
|
const projectPath = req.query.projectPath as string | undefined;
|
|
const { isRunning } = getSpecRegenerationStatus(projectPath);
|
|
res.json({ success: true, isRunning, projectPath });
|
|
} catch (error) {
|
|
res.status(500).json({ success: false, error: getErrorMessage(error) });
|
|
}
|
|
};
|
|
}
|