Skip to content

Commit 3c649b0

Browse files
committed
Return only relevant tasks modified by the prompt matching instead of all tasks
1 parent 78bd48d commit 3c649b0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/vscode/src/utils/tasks-utils.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const mark_task_as_completed_if_matches_prompt = (
125125
if (Object.keys(all_tasks).length === 0) return null
126126

127127
let file_changed = false
128+
const relevant_tasks: Record<string, Task[]> = {}
128129

129130
const process_tasks = (tasks: Task[]) => {
130131
for (const task of tasks) {
@@ -143,13 +144,14 @@ export const mark_task_as_completed_if_matches_prompt = (
143144
const tasks = all_tasks[folder.uri.fsPath]
144145
if (tasks) {
145146
process_tasks(tasks)
147+
relevant_tasks[folder.uri.fsPath] = tasks
146148
}
147149
})
148150
}
149151

150152
if (file_changed) {
151153
save_all_tasks(context, all_tasks)
152-
return all_tasks
154+
return relevant_tasks
153155
}
154156

155157
return null

0 commit comments

Comments
 (0)