MCPcopy Create free account
hub / github.com/codeaashu/claude-code / description

Function description

src/commands/sandbox-toggle/index.ts:7–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const command = {
6 name: 'sandbox',
7 get description() {
8 const currentlyEnabled = SandboxManager.isSandboxingEnabled()
9 const autoAllow = SandboxManager.isAutoAllowBashIfSandboxedEnabled()
10 const allowUnsandboxed = SandboxManager.areUnsandboxedCommandsAllowed()
11 const isLocked = SandboxManager.areSandboxSettingsLockedByPolicy()
12 const hasDeps = SandboxManager.checkDependencies().errors.length === 0
13
14 // Show warning icon if dependencies missing, otherwise enabled/disabled status
15 let icon: string
16 if (!hasDeps) {
17 icon = figures.warning
18 } else {
19 icon = currentlyEnabled ? figures.tick : figures.circle
20 }
21
22 let statusText = 'sandbox disabled'
23 if (currentlyEnabled) {
24 statusText = autoAllow
25 ? 'sandbox enabled (auto-allow)'
26 : 'sandbox enabled'
27
28 // Add unsandboxed fallback status
29 statusText += allowUnsandboxed ? ', fallback allowed' : ''
30 }
31
32 if (isLocked) {
33 statusText += ' (managed)'
34 }
35
36 return `${icon} ${statusText} (⏎ to configure)`
37 },
38 argumentHint: 'exclude "command pattern"',
39 get isHidden() {
40 return (

Callers

nothing calls this directly

Tested by

no test coverage detected