This commit is contained in:
Isidor
2026-03-20 20:27:44 +01:00
parent 289b95b8b6
commit 2372a22ba1
2 changed files with 2 additions and 11 deletions

View File

@@ -720,12 +720,8 @@ export class RunInTerminalTool extends Disposable implements IToolImpl {
}
if (requiresUnsandboxConfirmation) {
disclaimer = new MarkdownString([
disclaimer?.value,
localize('runInTerminal.unsandboxed.disclaimer', "$(warning) This command will run outside the terminal sandbox and may access files, network resources, or system state that sandboxed commands cannot reach.")
].filter(Boolean).join(' '), { supportThemeIcons: true, isTrusted: disclaimer?.isTrusted });
confirmationTitle = args.isBackground
? localize('runInTerminal.unsandboxed.background', "Run `{0}` command outside the sandbox in background?", shellType)
? localize('runInTerminal.unsandboxed.background', "Run `{0}` background command outside the sandbox?", shellType)
: localize('runInTerminal.unsandboxed', "Run `{0}` command outside the sandbox?", shellType);
}

View File

@@ -480,12 +480,7 @@ suite('RunInTerminalTool', () => {
}
ok(confirmationMessage.value.includes('Reason for leaving the sandbox: Needs network access outside the sandbox'));
const disclaimer = result?.confirmationMessages?.disclaimer;
ok(disclaimer && typeof disclaimer !== 'string');
if (!disclaimer || typeof disclaimer === 'string') {
throw new Error('Expected markdown disclaimer');
}
ok(disclaimer.value.includes('outside the terminal sandbox'));
strictEqual(result?.confirmationMessages?.disclaimer, undefined);
strictEqual(result?.confirmationMessages?.terminalCustomActions, undefined);
});
});