Commit 94ecf40
committed
feat(calendar): add nc_calendar_complete_todo convenience tool
Add a one-shot "complete this todo" wrapper around update_todo. It sets
STATUS=COMPLETED, PERCENT-COMPLETE=100, and the COMPLETED timestamp in
a single call.
The same operation has always been possible via nc_calendar_update_todo
with three explicit fields, but for AI clients the phrasing
"complete this task" is much more natural than "set status to COMPLETED,
set percent_complete to 100, and set completed to <now>" — the latter
forces the client to compute a timestamp and remember three field names.
A dedicated tool also pairs naturally with the existing delete_todo,
update_todo, and create_todo trio.
The implementation is a thin wrapper: it delegates to
client.calendar.update_todo with a fixed three-field payload, defaulting
completed_at to dt.datetime.now(dt.timezone.utc).isoformat() when the
caller doesn't supply one. No client-side or model changes are needed.
Verified end-to-end against Nextcloud 33.0.2:
create_todo -> complete_todo -> search_todos shows
status=COMPLETED, percent_complete=100, completed=<timestamp>.1 parent 61cadf7 commit 94ecf40
1 file changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1107 | 1151 | | |
1108 | 1152 | | |
1109 | 1153 | | |
| |||
0 commit comments