UNPKG

scai

Version:

> **AI-powered CLI for local code analysis, commit message suggestions, and natural-language queries.** 100% local, private, GDPR-friendly, made in Denmark/EU with ❤️.

9 lines (8 loc) 431 B
import path from 'path'; import crypto from 'crypto'; // put this helper at top-level (or import from shared utils) export function getUniqueId(name, filePath, startLine, startColumn, content) { const normalizedPath = path.normalize(filePath).replace(/\\/g, '/'); const hash = crypto.createHash('md5').update(content).digest('hex').slice(0, 6); return `${name}@${normalizedPath}:${startLine}:${startColumn}:${hash}`; }