refactor: reorganize spec regeneration routes and add unit tests

- Removed the old spec regeneration routes and replaced them with a new structure under the app-spec directory for better modularity.
- Introduced unit tests for common functionalities in app-spec, covering state management and error handling.
- Added documentation on route organization patterns to improve maintainability and clarity for future development.
This commit is contained in:
Cody Seibert
2025-12-14 17:45:11 -05:00
parent b3ea506a73
commit c280225a4e
5 changed files with 930 additions and 9 deletions

View File

@@ -27,7 +27,6 @@ import { createGitRoutes } from "./routes/git.js";
import { createSetupRoutes } from "./routes/setup.js";
import { createSuggestionsRoutes } from "./routes/suggestions.js";
import { createModelsRoutes } from "./routes/models.js";
import { createSpecRegenerationRoutes } from "./routes/spec-regeneration.js";
import { createRunningAgentsRoutes } from "./routes/running-agents.js";
import { createWorkspaceRoutes } from "./routes/workspace.js";
import { createTemplatesRoutes } from "./routes/templates.js";
@@ -41,6 +40,7 @@ import { AgentService } from "./services/agent-service.js";
import { FeatureLoader } from "./services/feature-loader.js";
import { AutoModeService } from "./services/auto-mode-service.js";
import { getTerminalService } from "./services/terminal-service.js";
import { createSpecRegenerationRoutes } from "./routes/app-spec/index.js";
// Load environment variables
dotenv.config();

View File

@@ -1,8 +0,0 @@
/**
* Spec Regeneration routes - HTTP API for AI-powered spec generation
*
* This file re-exports from the app-spec directory to maintain backward compatibility.
* The actual implementation has been split into smaller modules in ./app-spec/
*/
export { createSpecRegenerationRoutes } from "./app-spec/index.js";