mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-28 07:16:53 +05:00
- Project setup with tsup, vitest, ESM support - Domain entities: Session, Project - Value objects: FileData, FileAST, FileMeta, ChatMessage, ToolCall, ToolResult, UndoEntry - Service interfaces: IStorage, ILLMClient, ITool, IIndexer, IToolRegistry - Shared: Config (zod), IpuaroError, utils (hash, tokens), Result type - CLI with placeholder commands (start, init, index) - 91 unit tests with 100% coverage - Fix package scope @puaros -> @samiyev in CLAUDE.md
27 lines
616 B
TypeScript
27 lines
616 B
TypeScript
/**
|
|
* Represents file content with metadata for change detection.
|
|
*/
|
|
export interface FileData {
|
|
/** File content split into lines */
|
|
lines: string[]
|
|
/** MD5 hash for change detection */
|
|
hash: string
|
|
/** File size in bytes */
|
|
size: number
|
|
/** Last modification timestamp (ms) */
|
|
lastModified: number
|
|
}
|
|
|
|
export function createFileData(
|
|
lines: string[],
|
|
hash: string,
|
|
size: number,
|
|
lastModified: number,
|
|
): FileData {
|
|
return { lines, hash, size, lastModified }
|
|
}
|
|
|
|
export function isFileDataEqual(a: FileData, b: FileData): boolean {
|
|
return a.hash === b.hash
|
|
}
|