mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix: satisfy approval client CI checks
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user