Doc kit command
comment.locate
Locate Comment Anchors
Answers where each of a host's comment anchors is in the document now, after edits: whether it is found, the text it covers, its page, and the rectangles to highlight.
- Kit
- Doc 0.1.0 (.docx)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
anchors | object[] | no | [{ids: [object], range?: {start, end}, quote?, page?}] |
Call through doc_run
text
doc_run {
"path": "<file>.docx",
"steps": [{ "command": "comment.locate" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: anchors. doc_run answers the step’s result in completed[i].result.
Result
Result JSON Schema
json
{
"type": "array"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"anchors": {
"description": "[{ids: [object], range?: {start, end}, quote?, page?}]",
"items": {
"additionalProperties": true,
"properties": {
"ids": {
"items": {},
"type": "array"
},
"page": {
"type": "integer"
},
"quote": {},
"range": {
"additionalProperties": true,
"properties": {
"end": {
"type": "number"
},
"start": {
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"returns": "[{found, exact, text, page, at: {page, x, y, height} | null, rects: [{page, x, y, width, height}]}] (where each host comment anchor is in this view now, after edits: exact when its quote is still where its range says; page counts from 1)",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (doc_commands through @kition/[email protected], built from KitionAI/kition-doc@41e14a8). As data: commands.jsonl.