mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
fix(ui): remove Node.js process references from browser code
process.env.HOME and process.cwd() don't exist in browsers. Replaced with proper error handling when case path is missing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -839,7 +839,8 @@ class ClaudemanApp {
|
|||||||
if (!createCaseData.success) throw new Error(createCaseData.error || 'Failed to create case');
|
if (!createCaseData.success) throw new Error(createCaseData.error || 'Failed to create case');
|
||||||
}
|
}
|
||||||
|
|
||||||
const workingDir = caseData.path || `${process.env.HOME}/claudeman-cases/${caseName}`;
|
const workingDir = caseData.path;
|
||||||
|
if (!workingDir) throw new Error('Case path not found');
|
||||||
let firstSessionId = null;
|
let firstSessionId = null;
|
||||||
|
|
||||||
// Find the highest existing w-number for this case to avoid duplicates
|
// Find the highest existing w-number for this case to avoid duplicates
|
||||||
@@ -928,7 +929,8 @@ class ClaudemanApp {
|
|||||||
// Get the case path
|
// Get the case path
|
||||||
const caseRes = await fetch(`/api/cases/${caseName}`);
|
const caseRes = await fetch(`/api/cases/${caseName}`);
|
||||||
const caseData = await caseRes.json();
|
const caseData = await caseRes.json();
|
||||||
const workingDir = caseData.path || process.cwd();
|
const workingDir = caseData.path;
|
||||||
|
if (!workingDir) throw new Error('Case path not found');
|
||||||
|
|
||||||
// Find the highest existing s-number for shells to avoid duplicates
|
// Find the highest existing s-number for shells to avoid duplicates
|
||||||
let startNumber = 1;
|
let startNumber = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user