MCPcopy Create free account
hub / github.com/agent-tower/core / useGitChanges

Function useGitChanges

packages/web/src/hooks/use-git.ts:39–48  ·  view source on GitHub ↗
(workingDir: string | undefined, options: { enabled?: boolean } = {})

Source from the content-addressed store, hash-verified

37 commits: GitLogEntry[]
38}
39
40export type GitCommitFilesResponse = {
41 files: GitChangeEntry[]
42}
43
44export function useGitChanges(workingDir: string | undefined, options: { enabled?: boolean } = {}) {
45 const visibleContext = useGitVisibilityStore((state) => state.visibleContext)
46 const refreshInterval = getGitChangesRefreshInterval(workingDir, visibleContext)
47
48 return useQuery({
49 queryKey: queryKeys.git.changes(workingDir || ''),
50 queryFn: () =>
51 apiClient.get<GitChangesResponse>('/git/changes', {

Callers 4

ReviewViewFunction · 0.90
TaskDetailFunction · 0.90
MobileTaskDetailFunction · 0.90
MobileChangesViewFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected