---
title: "edit.undo: Undo — HTML kit command — Kition"
description: "Takes back the caller's last `file.setSource` (the person's or, with `scope: \"agent\"`, the agent's) without touching the other's edits."
canonical: "https://developer.kition.ai/docs/kits/html/commands/edit.undo"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/html/commands/edit.undo](https://developer.kition.ai/docs/kits/html/commands/edit.undo)

# edit.undo

**Undo.** Takes back the caller's last `file.setSource` (the person's or, with `scope: "agent"`, the agent's) without touching the other's edits.

- Kit: HTML 0.1.0 (HTML (.html or .htm)); reference: [HTML kit commands](https://developer.kition.ai/docs/kits/html.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `scope` | `"person" \| "agent"` | no |  |

## Call through html_run

```text
html_run {
  "path": "<file>.html",
  "steps": [{ "command": "edit.undo" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `scope`. html_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "scope": {
      "enum": [
        "person",
        "agent"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/html-darwin-arm64@0.1.0 and the kit itself (html_commands through @kition/cli@0.1.1, built from KitionAI/kition-html@e0ad2d3).
