@comfanion/usethis_todo 0.1.16-dev.7 → 0.1.16-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +10 -6
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -82,11 +82,16 @@ const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
82
82
  // Reads the data our write already stored and returns native JSON format.
83
83
  // tool.execute.after on usethis_todo_write auto-invokes this via description hint.
84
84
  todowrite: {
85
- description: "Internal: sync TODO sidebar. Called automatically after usethis_todo_write.",
86
- args: {},
87
- async execute(_args: any, context: any) {
85
+ description: write.description, // Use same description as write
86
+ args: write.args, // Use same args as write
87
+ async execute(args: any, context: any) {
88
+ // If args provided, perform write first
89
+ if (args.todos && args.todos.length > 0) {
90
+ await write.execute(args, context)
91
+ }
92
+
93
+ // Then return native JSON format
88
94
  const todos = await readTodos(context.sessionID, context.directory)
89
- // Return native format: JSON array → TUI renders checklist + fires todo.updated
90
95
  return JSON.stringify(todos.map(t => ({
91
96
  id: t.id,
92
97
  content: t.content,
@@ -125,9 +130,8 @@ const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
125
130
  output.title = "Next 5 tasks"
126
131
  } else if (input.tool === "usethis_todo_read_by_id") {
127
132
  output.title = "Task details"
128
- } else if (input.tool === "todowrite") {
129
- output.title = "Sidebar sync"
130
133
  }
134
+ // Don't touch todowrite title — let TUI handle it natively
131
135
  },
132
136
  }
133
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/usethis_todo",
3
- "version": "0.1.16-dev.7",
3
+ "version": "0.1.16-dev.9",
4
4
  "description": "OpenCode plugin: enhanced TODO tools (dual storage + dependency graph)",
5
5
  "type": "module",
6
6
  "main": "./index.ts",