Refactor application path handling and data storage architecture

Replace simple directory-based path system with git-aware data management that uses global data directories and proper workspace detection.

🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
Dax Raad
2025-06-01 14:40:44 -04:00
parent 4be9f7ab9c
commit 526a8ea19a
17 changed files with 69 additions and 42 deletions

View File

@@ -0,0 +1,18 @@
import { exists } from "fs/promises"
import { dirname, join } from "path"
export namespace Filesystem {
export async function findUp(target: string, start: string) {
let currentDir = start
while (true) {
const targetPath = join(currentDir, target)
if (await exists(targetPath)) return targetPath
const parentDir = dirname(currentDir)
if (parentDir === currentDir) {
return
}
currentDir = parentDir
}
}
}