fix: remove last process.cwd() fallback in file upload path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
7418andClaude Opus 4.6 committed 2026-02-13 18:06:49 +08:00
1 parent 3fa3058b09
commit c21d8e4e90
1 file changed
+1 -1
+1 -1
View File
@@ -487,7 +487,7 @@ export function streamClaude(options: ClaudeStreamOptions): ReadableStream<strin
// Save non-image files to disk for Read tool access
let textPrompt = prompt;
if (nonImageFiles.length > 0) {
const workDir = workingDirectory || process.cwd();
const workDir = workingDirectory || os.homedir();
const savedPaths = getUploadedFilePaths(nonImageFiles, workDir);
const fileReferences = savedPaths
.map((p, i) => `[User attached file: ${p} (${nonImageFiles[i].name})]`)