fix: use --add-dir flag for granting Claude read access to uploads

This commit is contained in:
weishu
2026-01-17 19:38:12 +08:00
parent 53e4de6684
commit c44eae0b17
6 changed files with 24 additions and 4 deletions
+2
View File
@@ -9,6 +9,7 @@ import { getProjectPath } from "./utils/path";
import { awaitFileExist } from "@/modules/watcher/awaitFileExist";
import { systemPrompt } from "./utils/systemPrompt";
import { PermissionResult } from "./sdk/types";
import { getHapiBlobsDir } from "@/constants/uploadPaths";
export async function claudeRemote(opts: {
@@ -123,6 +124,7 @@ export async function claudeRemote(opts: {
abort: opts.signal,
pathToClaudeCodeExecutable: 'claude',
settingsPath: opts.hookSettingsPath,
additionalDirectories: [getHapiBlobsDir()],
}
// Track thinking state