Design kit command

widget.insert

Insert widget

Inserts a widget drawn by a widget plugin at x, y; answers its state and output.

Kit
Design 0.1.0 (.kdesign)
Changes the document
yes

Parameters

Parameters of widget.insert
NameTypeRequiredDescription
fuelintegerno
pluginstringno
xnumberno
ynumbernotop-left; default: centred in the view

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "widget.insert" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: fuel, plugin, x, y. design_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": {
    "fuel": {
      "type": "integer"
    },
    "plugin": {
      "type": "string"
    },
    "x": {
      "type": "number"
    },
    "y": {
      "description": "top-left; default: centred in the view",
      "type": "number"
    }
  },
  "returns": "{id, plugin, state, targets, output, logs, calls, fuel}",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (design_commands through @kition/[email protected], built from KitionAI/kition-design@abc7e16). As data: commands.jsonl.