mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
fix: adress pr comments
- Added validation to check if the specified worktree path exists before generating commit messages. - Implemented a check to ensure the worktree path is a valid git repository by verifying the presence of the .git directory. - Improved error handling by returning appropriate responses for invalid paths and non-git repositories.
This commit is contained in:
@@ -82,10 +82,13 @@ export function ClaudeUsageSection() {
|
||||
|
||||
useEffect(() => {
|
||||
// Initial fetch if authenticated and stale
|
||||
if (canFetchUsage && isStale) {
|
||||
// Compute staleness inside effect to avoid re-running when Date.now() changes
|
||||
const isDataStale =
|
||||
!claudeUsageLastUpdated || Date.now() - claudeUsageLastUpdated > STALE_THRESHOLD_MS;
|
||||
if (canFetchUsage && isDataStale) {
|
||||
void fetchUsage();
|
||||
}
|
||||
}, [fetchUsage, canFetchUsage, isStale]);
|
||||
}, [fetchUsage, canFetchUsage, claudeUsageLastUpdated]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!canFetchUsage) return undefined;
|
||||
|
||||
Reference in New Issue
Block a user