fix: satisfy approval client CI checks

This commit is contained in:
Dallin Romney
2026-08-20 23:04:37 -07:00
parent 52387ea5de
commit c4de2ccac5
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -443,13 +443,13 @@ private func makePendingExecApprovalJSON(
{
makePendingApprovalJSON(
id: approvalID,
instanceID: instanceID,
presentation: execApprovalPresentation(
commandText: commandText,
commandPreview: commandPreview,
warningText: warningText,
agentID: agentID,
allowedDecisions: allowedDecisions))
allowedDecisions: allowedDecisions),
instanceID: instanceID)
}
private func makeDeniedExecApprovalJSON(
+2 -3
View File
@@ -403,7 +403,6 @@ export class ApprovalPage extends OpenClawLightDomElement {
) {
return;
}
const kind = approval.presentation.kind;
const generation = ++this.operationGeneration;
const isCurrentDecision = () =>
this.isCurrentOperation({ client, generation, id }) && this.hasApprovalGrantAccess;
@@ -417,7 +416,7 @@ export class ApprovalPage extends OpenClawLightDomElement {
const result = await client.request<ApprovalResolveResult>("approval.resolve", {
id,
...(approval.instanceId ? { instanceId: approval.instanceId } : {}),
kind,
kind: approval.presentation.kind,
decision,
});
if (!isCurrentDecision()) {
@@ -426,7 +425,7 @@ export class ApprovalPage extends OpenClawLightDomElement {
if (
!validateApprovalResolveResult(result) ||
result.approval.id !== id ||
result.approval.presentation.kind !== kind ||
result.approval.presentation.kind !== approval.presentation.kind ||
!appliedDecisionMatches(result, decision)
) {
// The write outcome is unknown. Keep every decision disabled until a