Note kit command

link.update

Change a link

Changes the destination (and the text, when given) of the `index`-th link on `line`, as `links.list` numbers them; nothing else of the link changes.

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

Parameters

Parameters of link.update
NameTypeRequiredDescription
destinationstringyesThe new destination.
indexintegeryesWhich link of the line, from 0.
lineintegeryesThe link's line, from 1.
textstringnoThe new text shown.

Call through note_run

text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "link.update", "params": { "destination": <string>, "index": <integer>, "line": <integer> } }]
}

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

Result

Result of link.update
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": {
    "destination": {
      "description": "The new destination.",
      "type": "string"
    },
    "index": {
      "description": "Which link of the line, from 0.",
      "type": "integer"
    },
    "line": {
      "description": "The link's line, from 1.",
      "type": "integer"
    },
    "text": {
      "description": "The new text shown.",
      "type": "string"
    }
  },
  "required": [
    "destination",
    "index",
    "line"
  ],
  "type": "object"
}

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