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

Function useGitCommitDiff

packages/web/src/hooks/use-git.ts:91–100  ·  view source on GitHub ↗
(workingDir: string | undefined, hash: string | null, filePath: string | null)

Source from the content-addressed store, hash-verified

89 filePath: string | null,
90 type: 'uncommitted' | 'committed',
91 token: string | undefined,
92 options: { force?: boolean } = {},
93) {
94 const force = options.force === true
95 return useQuery({
96 queryKey: queryKeys.gitDiffs.file(workingDir || '', type, filePath || '', token ?? '', force),
97 queryFn: ({ signal }) =>
98 apiClient.get<GitDiffResponse>('/git/diff', {
99 params: {
100 workingDir: workingDir || '',
101 path: filePath || '',
102 type,
103 ...(force ? { force: '1' } : {}),

Callers 3

CommitDiffViewerFunction · 0.90
CommitDiffBodyFunction · 0.90
InlineCommitDiffFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected