Note kit command

edit.undo

Undo

Takes back the caller's last edit (the person's or, with `scope: "agent"`, the agent's) without touching the other's edits; answers whether there was one.

Kit
Note 0.3.0 (Markdown (.md))
Changes the document
yes

Parameters

Parameters of edit.undo
NameTypeRequiredDescription
scope"person" | "agent"noWhose last step to undo: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).

Call through note_run

text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "edit.undo" }]
}

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

Result

Result of edit.undo
NameTypeRequiredDescription
damageobjectyesWhat the step made stale on screen.
donebooleanyesWhether there was a step to take; false changes nothing.
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "damage": {
      "additionalProperties": false,
      "description": "What the step made stale on screen.",
      "properties": {
        "kind": {
          "description": "Nothing, the whole view, or the rectangles in rects.",
          "enum": [
            "none",
            "full",
            "rects"
          ],
          "type": "string"
        },
        "rects": {
          "description": "With kind rects: the areas to draw again, in document pixels.",
          "items": {
            "description": "[x0, y0, x1, y1]",
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "type": "array"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "done": {
      "description": "Whether there was a step to take; false changes nothing.",
      "type": "boolean"
    }
  },
  "required": [
    "damage",
    "done"
  ],
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "scope": {
      "description": "Whose last step to undo: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).",
      "enum": [
        "person",
        "agent"
      ],
      "type": "string"
    }
  },
  "type": "object"
}

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9). As data: commands.jsonl.