refactor: move setIsGenerationRunning(false) outside if block

Address PR review feedback - ensure isGenerationRunning is always
reset to false when generation is not running, even if
api.specRegeneration is not available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2026-01-05 16:01:41 +01:00
parent 84d93c2901
commit 73d0edb873

View File

@@ -28,8 +28,9 @@ export function useSpecLoading() {
setIsLoading(false);
return;
}
setIsGenerationRunning(false);
}
// Always reset when generation is not running (handles edge case where api.specRegeneration might not be available)
setIsGenerationRunning(false);
const result = await api.readFile(`${currentProject.path}/.automaker/app_spec.txt`);