mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 16:40:26 +00:00
fix: resolve format/build failures
This commit is contained in:
@@ -9,9 +9,7 @@ import {
|
||||
} from "../protocol/index.js";
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
|
||||
export function createExecApprovalHandlers(
|
||||
manager: ExecApprovalManager,
|
||||
): GatewayRequestHandlers {
|
||||
export function createExecApprovalHandlers(manager: ExecApprovalManager): GatewayRequestHandlers {
|
||||
return {
|
||||
"exec.approval.request": async ({ params, respond, context }) => {
|
||||
if (!validateExecApprovalRequestParams(params)) {
|
||||
@@ -61,12 +59,16 @@ export function createExecApprovalHandlers(
|
||||
{ dropIfSlow: true },
|
||||
);
|
||||
const decision = await manager.waitForDecision(record, timeoutMs);
|
||||
respond(true, {
|
||||
id: record.id,
|
||||
decision,
|
||||
createdAtMs: record.createdAtMs,
|
||||
expiresAtMs: record.expiresAtMs,
|
||||
}, undefined);
|
||||
respond(
|
||||
true,
|
||||
{
|
||||
id: record.id,
|
||||
decision,
|
||||
createdAtMs: record.createdAtMs,
|
||||
expiresAtMs: record.expiresAtMs,
|
||||
},
|
||||
undefined,
|
||||
);
|
||||
},
|
||||
"exec.approval.resolve": async ({ params, respond, client, context }) => {
|
||||
if (!validateExecApprovalResolveParams(params)) {
|
||||
|
||||
@@ -453,14 +453,10 @@ export const nodeHandlers: GatewayRequestHandlers = {
|
||||
loadGatewayModelCatalog: context.loadGatewayModelCatalog,
|
||||
logGateway: { warn: context.logGateway.warn },
|
||||
};
|
||||
await handleNodeEvent(
|
||||
nodeContext,
|
||||
"node",
|
||||
{
|
||||
event: p.event,
|
||||
payloadJSON,
|
||||
},
|
||||
);
|
||||
await handleNodeEvent(nodeContext, "node", {
|
||||
event: p.event,
|
||||
payloadJSON,
|
||||
});
|
||||
respond(true, { ok: true }, undefined);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user