diff options
| author | Yuki Okita <[email protected]> | 2025-08-01 04:02:08 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-31 19:02:08 +0000 |
| commit | f9a05401c1d2d93d1251d3ebf2c079ee1f4ba8df (patch) | |
| tree | 870f1cf4b31ed974ca180bb7068388ba2dfc3788 /packages/core/src/config/config.ts | |
| parent | 9a6422f331294ea2f56d67599ed142d09cc33320 (diff) | |
feat: Multi-Directory Workspace Support (part2: add "directory" command) (#5241)
Diffstat (limited to 'packages/core/src/config/config.ts')
| -rw-r--r-- | packages/core/src/config/config.ts | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index edb24351..b2d5f387 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -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; } |
