@comfanion/usethis_todo 0.1.16-dev.10 → 0.1.16-dev.11
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.
- package/index.ts +7 -12
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -106,22 +106,18 @@ const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
|
|
|
106
106
|
output.title = "Task details"
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
109
|
|
|
112
110
|
// Set nicer titles in TUI + track prune state
|
|
113
111
|
"tool.execute.after": async (input, output) => {
|
|
114
|
-
const ourTools = new Set(["usethis_todo_write", "usethis_todo_read", "usethis_todo_read_five", "usethis_todo_read_by_id"
|
|
112
|
+
const ourTools = new Set(["usethis_todo_write", "usethis_todo_read", "usethis_todo_read_five", "usethis_todo_read_by_id"])
|
|
115
113
|
if (!ourTools.has(input.tool)) return
|
|
116
114
|
|
|
117
|
-
// Update prune state with latest call ID
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
pruneStates.set(sessionID, state)
|
|
124
|
-
}
|
|
115
|
+
// Update prune state with latest call ID
|
|
116
|
+
const sessionID = input.sessionID
|
|
117
|
+
if (sessionID) {
|
|
118
|
+
const state = pruneStates.get(sessionID) || { lastToolCallId: null }
|
|
119
|
+
state.lastToolCallId = input.callID
|
|
120
|
+
pruneStates.set(sessionID, state)
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
const out = output.output || ""
|
|
@@ -138,7 +134,6 @@ const UsethisTodoPlugin: Plugin = async ({ directory, client }) => {
|
|
|
138
134
|
} else if (input.tool === "usethis_todo_read_by_id") {
|
|
139
135
|
output.title = "Task details"
|
|
140
136
|
}
|
|
141
|
-
// Don't touch todowrite title — let TUI handle it natively
|
|
142
137
|
},
|
|
143
138
|
}
|
|
144
139
|
}
|