fix: show exec approval alerts for local mac node

This commit is contained in:
Peter Steinberger
2026-01-18 13:42:19 +00:00
parent e944f21ec0
commit f3ef609839
2 changed files with 4 additions and 5 deletions

View File

@@ -157,9 +157,10 @@ final class ExecApprovalsPromptServer {
}
}
private enum ExecApprovalsPromptPresenter {
enum ExecApprovalsPromptPresenter {
@MainActor
static func prompt(_ request: ExecApprovalPromptRequest) -> ExecApprovalDecision {
NSApp.activate(ignoringOtherApps: true)
let alert = NSAlert()
alert.alertStyle = .warning
alert.messageText = "Allow this command?"

View File

@@ -485,10 +485,8 @@ actor MacNodeRuntime {
var approvedByAsk = false
if requiresAsk {
let decision = await ExecApprovalsSocketClient.requestDecision(
socketPath: approvals.socketPath,
token: approvals.token,
request: ExecApprovalPromptRequest(
let decision: ExecApprovalDecision? = await ExecApprovalsPromptPresenter.prompt(
ExecApprovalPromptRequest(
command: displayCommand,
cwd: params.cwd,
host: "node",