Added getCwdHash proto (#6773)
This commit is contained in:
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 })
|
||||
}
|
||||
Reference in new issue
Block a user