@comfanion/usethis_todo 0.1.15-dev.3 → 0.1.15-dev.4

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 +16 -1
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -127,7 +127,22 @@ const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
127
127
  output.title = "📋 Task details"
128
128
  }
129
129
 
130
- // Publish snapshot into chat (helps when sidebar doesn't refresh)
130
+ // After write/update try to refresh sidebar via session re-select
131
+ const writeTools = new Set(["usethis_todo_write", "usethis_todo_update"])
132
+ if (writeTools.has(input.tool) && sessionID) {
133
+ try {
134
+ await (client as any)?.tui?.publish?.({
135
+ body: {
136
+ type: "tui.session.select",
137
+ properties: { sessionID },
138
+ },
139
+ })
140
+ } catch {
141
+ // non-fatal — experimental sidebar refresh
142
+ }
143
+ }
144
+
145
+ // Publish snapshot into chat (fallback when sidebar doesn't refresh)
131
146
  const publishTools = new Set([
132
147
  "usethis_todo_write",
133
148
  "usethis_todo_update",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/usethis_todo",
3
- "version": "0.1.15-dev.3",
3
+ "version": "0.1.15-dev.4",
4
4
  "description": "OpenCode plugin: enhanced TODO tools (dual storage + dependency graph)",
5
5
  "type": "module",
6
6
  "main": "./index.ts",