mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 11:09:34 +00:00
12 lines
333 B
TypeScript
12 lines
333 B
TypeScript
import path from "node:path";
|
|
|
|
export function sessionPathKey(
|
|
filePath: string,
|
|
platform: NodeJS.Platform = process.platform,
|
|
): string {
|
|
const normalized = platform === "win32"
|
|
? path.win32.normalize(filePath)
|
|
: path.posix.normalize(filePath);
|
|
return platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
}
|