MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / fingerprintFiles

Function fingerprintFiles

apps/kimi-code/src/feedback/codebase/scanner.ts:195–206  ·  view source on GitHub ↗
(files: readonly FeedbackCodebaseFile[])

Source from the content-addressed store, hash-verified

193}
194
195function fingerprintFiles(files: readonly FeedbackCodebaseFile[]): string {
196 const hash = createHash('sha256');
197 for (const file of files) {
198 hash.update(file.path);
199 hash.update('\0');
200 hash.update(String(file.size));
201 hash.update('\0');
202 hash.update(String(Math.trunc(file.mtimeMs)));
203 hash.update('\n');
204 }
205 return hash.digest('hex');
206}
207
208function splitNull(buffer: Buffer): string[] {
209 return buffer

Callers 1

scanCodebaseFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected