Note kit command

task.toggle

Check or uncheck a task

Checks or unchecks the task at `line` (from 1) or carrying `blockId`; `done` sets it, otherwise it flips. Answers whether it is checked now. Get lines from `tasks.list`.

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

Parameters

Parameters of task.toggle
NameTypeRequiredDescription
blockIdstringnoThe task's block id, instead of line.
donebooleannoChecked or not; flips it by default.
lineintegernoThe task's line, from 1.
taskstringnoThe task's id from tasks.list ("task:2"), instead of line or blockId.

Call through note_run

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

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

Result

Result of task.toggle
NameTypeRequiredDescription
changedbooleanyesWhether the note's text changed.
donebooleanyesWhether the task is checked now.
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "changed": {
      "description": "Whether the note's text changed.",
      "type": "boolean"
    },
    "done": {
      "description": "Whether the task is checked now.",
      "type": "boolean"
    }
  },
  "required": [
    "changed",
    "done"
  ],
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "blockId": {
      "description": "The task's block id, instead of line.",
      "type": "string"
    },
    "done": {
      "description": "Checked or not; flips it by default.",
      "type": "boolean"
    },
    "line": {
      "description": "The task's line, from 1.",
      "type": "integer"
    },
    "task": {
      "description": "The task's id from tasks.list (\"task:2\"), instead of line or blockId.",
      "type": "string"
    }
  },
  "type": "object"
}

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