Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ const agentSessions = new Map<string, string>();
// Todo tracking per session (session_id -> current todos)
const sessionTodos = new Map<string, any[]>();

// Projects directory path - dynamically constructed from username
const PROJECTS_DIR = join(homedir(), '.claude', 'projects', `-Users-${process.env.USER || 'user'}--claude`);
// Projects directory path - dynamically constructed from HOME path (works on both macOS and Linux)
const homePathEncoded = (process.env.HOME || homedir()).replace(/\//g, '-');
const PROJECTS_DIR = join(homedir(), '.claude', 'projects', `${homePathEncoded}--claude`);

/**
* Get the most recently modified JSONL files in projects/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ const pendingDescriptions = new Set<string>();
// Callback for task updates
let onTaskUpdate: ((task: BackgroundTask) => void) | null = null;

// Tasks directory - dynamically constructed from username
const TASKS_DIR = `/tmp/claude/-Users-${process.env.USER || 'user'}--claude/tasks`;
// Tasks directory - dynamically constructed from HOME path (works on both macOS and Linux)
const homePathEncoded = (process.env.HOME || homedir()).replace(/\//g, '-');
const TASKS_DIR = `/tmp/claude/${homePathEncoded}--claude/tasks`;

// Idle threshold for determining completion (30 seconds)
const IDLE_THRESHOLD_MS = 30000;
Expand Down