+ {/* Repository Info */}
+
+
+
+ Repository Information
+
+
+
+
+ {gitStatus?.isGitRepo ? (
+ <>
+
+ Current Branch:
+
+ {gitStatus.currentBranch || 'unknown'}
+
+
+
+
+ Total Commits:
+ {gitStatus.totalCommits}
+
+
+ {gitStatus.latestCommit && (
+
+
Latest Commit:
+
+
+ {gitStatus.latestCommit.oid.substring(0, 7)}
+
+
{gitStatus.latestCommit.message}
+
+
+ {new Date(gitStatus.latestCommit.author.timestamp * 1000).toLocaleString()}
+
+
+
+ )}
+
+ {gitStatus.remotes.length > 0 && (
+
+
Remotes:
+ {gitStatus.remotes.map((remote) => (
+
+
+ {remote.name}
+
+ {remote.url}
+
+
+
+ ))}
+
+ )}
+ >
+ ) : (
+
+
+
Not a Git repository
+
+ )}
+
+
+
+ {/* Sync Status */}
+ {gitStatus?.isGitRepo && (
+
+
+ Sync Status
+
+
+
+
+
+ {syncStatus.text}
+
+
+
+ {gitStatus.remotes.length > 0 && (
+
+
+
+
+
+ )}
+
+ {/* Operation Results */}
+ {(pushResult || pullResult) && (
+
+ {pushResult && (
+
+ {pushResult}
+
+ )}
+ {pullResult && (
+
+ {pullResult}
+
+ )}
+
+ )}
+
+
+ )}
+
+ {/* Working Directory Changes */}
+ {gitStatus?.isGitRepo && gitStatus.changedFiles.length > 0 && (
+
+
+ Working Directory Changes
+
+ {gitStatus.changedFiles.length} file{gitStatus.changedFiles.length !== 1 ? 's' : ''} with changes
+
+
+
+
+ {gitStatus.changedFiles.map((file, index) => (
+
+ {getFileStatusIcon(file.status)}
+
+ {file.filepath}
+
+
+ {file.status}
+
+
+ ))}
+
+
+
+ )}
+
+ {/* Clean Working Directory */}
+ {gitStatus?.isGitRepo && gitStatus.changedFiles.length === 0 && (
+
+
+
+
+
Working directory is clean
+
No uncommitted changes
+
+
+
+ )}
+
+