Skip to content

Commit 0bc1e5d

Browse files
committed
fix(permissions): restore /yolo off hint for default-source skip warning
1 parent 0640e3b commit 0bc1e5d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
import { globalSettingsPath as defaultGlobalSettingsPath } from "../config/settings.js";
2+
3+
function isDefaultSettingsSource(sourcePath: string): boolean {
4+
return sourcePath === defaultGlobalSettingsPath();
5+
}
6+
17
export function savedSkipPermissionsWarning(
28
globalSettingsPath: string,
39
): string {
4-
return `Warning: permission prompts are disabled by saved settings at ${globalSettingsPath}; edit that file to re-enable.`;
10+
const base = `Warning: permission prompts are disabled by saved settings at ${globalSettingsPath}; edit that file to re-enable`;
11+
if (isDefaultSettingsSource(globalSettingsPath)) {
12+
return `${base} (/yolo off to re-enable).`;
13+
}
14+
return `${base}.`;
515
}

0 commit comments

Comments
 (0)