Added getCwdHash proto (#6773)

This commit is contained in:
canvrno authored and GitHub committed 2025-10-12 03:23:56 +00:00
1 parent 8c05a9923d
commit 5c7bb7c5db
3 files changed
+28

No files matched your search

@@ -0,0 +1,18 @@
import { PathHashMap } from "@shared/proto/cline/checkpoints"
import { StringArrayRequest } from "@shared/proto/cline/common"
import { hashWorkingDir } from "@/integrations/checkpoints/CheckpointUtils"
import { Controller } from ".."
export async function getCwdHash(_controller: Controller, request: StringArrayRequest): Promise<PathHashMap> {
const pathHash: Record<string, string> = {}
for (const path of request.value) {
try {
pathHash[path] = hashWorkingDir(path)
} catch {
pathHash[path] = ""
}
}
return PathHashMap.create({ pathHash })
}