Note kit command

block.setId

Set a block id

Gives a block a block id (`^id`) so links and `block.*` commands can reach it: the block ending on `line`, or the one already carrying `blockId` (renaming its id).

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

Parameters

Parameters of block.setId
NameTypeRequiredDescription
blockIdstringnoThe block's current id, instead of line.
idstringyesThe new id: letters, digits and hyphens, without the caret.
lineintegernoThe block's last line, from 1.
occurrenceintegernoWhich of the blocks with that id, from 1.

Call through note_run

text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "block.setId", "params": { "id": <string> } }]
}

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

Result

Result of block.setId
NameTypeRequiredDescription
changedbooleanyesWhether the note's text changed (false when it already read so).
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "changed": {
      "description": "Whether the note's text changed (false when it already read so).",
      "type": "boolean"
    }
  },
  "required": [
    "changed"
  ],
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "blockId": {
      "description": "The block's current id, instead of line.",
      "type": "string"
    },
    "id": {
      "description": "The new id: letters, digits and hyphens, without the caret.",
      "type": "string"
    },
    "line": {
      "description": "The block's last line, from 1.",
      "type": "integer"
    },
    "occurrence": {
      "description": "Which of the blocks with that id, from 1.",
      "type": "integer"
    }
  },
  "required": [
    "id"
  ],
  "type": "object"
}

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