UNPKG

ccremote

Version:

Claude Code Remote: approve prompts from Discord, auto-continue sessions after quota resets, and schedule quota windows around your workday.

35 lines (33 loc) 893 B
import { basename, join } from "node:path"; import { homedir } from "node:os"; //#region src/utils/paths.ts /** * Get the global logs directory path */ function getGlobalLogsDir() { return join(homedir(), ".ccremote", "logs"); } /** * Get the log file path for a session */ function getSessionLogPath(sessionId) { return join(getGlobalLogsDir(), `${basename(process.cwd())}-${sessionId}.log`); } /** * Get all possible log file paths for a session (for backwards compatibility) */ function getAllSessionLogPaths(sessionId) { return [ `.ccremote/session-${sessionId}.log`, `.ccremote/logs/session-${sessionId}.log`, getSessionLogPath(sessionId) ]; } /** * Get the archive directory path */ function getArchiveDir() { return join(getGlobalLogsDir(), "archive"); } //#endregion export { getSessionLogPath as i, getArchiveDir as n, getGlobalLogsDir as r, getAllSessionLogPaths as t };