@comfanion/usethis_todo 0.1.12 → 0.1.13

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 +6 -10
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -11,16 +11,12 @@ interface TodoPruneState {
11
11
  const pruneStates = new Map<string, TodoPruneState>()
12
12
 
13
13
  const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
14
- // Resolve the authoritative state path from OpenCode server
15
- // This ensures native storage writes go to the exact directory the sidebar reads from
16
- try {
17
- const pathInfo = await client.path.get()
18
- if (pathInfo?.data?.state) {
19
- setNativeStorageBase(pathInfo.data.state)
20
- }
21
- } catch {
22
- // Fallback: tools.ts will guess from xdg/well-known paths
23
- }
14
+ // Resolve the authoritative state path from OpenCode server (non-blocking).
15
+ // Must NOT await server may block until plugin init completes deadlock.
16
+ client.path.get().then((pathInfo: any) => {
17
+ const state = pathInfo?.data?.state
18
+ if (state) setNativeStorageBase(state)
19
+ }).catch(() => {})
24
20
 
25
21
  // Ensure enhanced storage directory exists on init
26
22
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/usethis_todo",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "OpenCode plugin: enhanced TODO tools (dual storage + dependency graph)",
5
5
  "type": "module",
6
6
  "main": "./index.ts",