feat: Multi-Directory Workspace Support (part2: add "directory" command) (#5241)

This commit is contained in:
Yuki Okita
2025-08-01 04:02:08 +09:00
committed by GitHub
parent 8550d70a57
commit 0c0881348d
6 changed files with 377 additions and 1 deletions

View File

@@ -197,7 +197,7 @@ export class Config {
private readonly embeddingModel: string;
private readonly sandbox: SandboxConfig | undefined;
private readonly targetDir: string;
private readonly workspaceContext: WorkspaceContext;
private workspaceContext: WorkspaceContext;
private readonly debugMode: boolean;
private readonly question: string | undefined;
private readonly fullContext: boolean;
@@ -394,6 +394,17 @@ export class Config {
return this.sandbox;
}
isRestrictiveSandbox(): boolean {
const sandboxConfig = this.getSandbox();
const seatbeltProfile = process.env.SEATBELT_PROFILE;
return (
!!sandboxConfig &&
sandboxConfig.command === 'sandbox-exec' &&
!!seatbeltProfile &&
seatbeltProfile.startsWith('restrictive-')
);
}
getTargetDir(): string {
return this.targetDir;
}