spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / git / probes / stamp-probe-of / stamp-probe-of.ts
21 lines · 635 BRaw
1import type Types from '../../types'
2import { kindWalkOf } from '../kind-walk-of'
3
4/**
5 * A StampProbe rooted at a directory: a fresh, bounded kind walk over it
6 * and the host's timestamp probe.
7 *
8 * @param deps lists a directory, reads a timestamp
9 * @param base the absolute directory the probe's paths are under
10 * @param budget how many directories the walk may list
11 * @returns the probe
12 */
13export const stampProbeOf = (
14 deps: Pick<Types.GitDeps, 'entryKindsOf' | 'mtimeOf'>,
15 base: string,
16 budget: number,
17): Types.StampProbe => ({
18 walk: kindWalkOf(deps.entryKindsOf, base, budget),
19 base,
20 mtimeOf: deps.mtimeOf,
21})