opencode-auto-resume 1.1.6 → 1.1.8
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/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12523,6 +12523,8 @@ function isOpenTodo(t) {
|
|
|
12523
12523
|
return t.status === "pending" || t.status === "in_progress";
|
|
12524
12524
|
}
|
|
12525
12525
|
function getOpenTodos(todos) {
|
|
12526
|
+
if (!Array.isArray(todos))
|
|
12527
|
+
return [];
|
|
12526
12528
|
return todos.filter(isOpenTodo);
|
|
12527
12529
|
}
|
|
12528
12530
|
function buildOpenTodosReminder(todos) {
|
|
@@ -13911,12 +13913,13 @@ var AutoResumePlugin = async (ctx, options) => {
|
|
|
13911
13913
|
if (!sid)
|
|
13912
13914
|
break;
|
|
13913
13915
|
const props = ev.properties;
|
|
13914
|
-
const
|
|
13916
|
+
const rawTodos = props?.todos;
|
|
13917
|
+
const todos = Array.isArray(rawTodos) ? rawTodos : [];
|
|
13915
13918
|
const w = ensureWatch(sid);
|
|
13916
13919
|
w.todos = todos.map((t) => ({
|
|
13917
|
-
content: t
|
|
13918
|
-
status: t
|
|
13919
|
-
priority: t
|
|
13920
|
+
content: t?.content ?? "",
|
|
13921
|
+
status: t?.status ?? "pending",
|
|
13922
|
+
priority: t?.priority ?? "medium"
|
|
13920
13923
|
}));
|
|
13921
13924
|
break;
|
|
13922
13925
|
}
|
package/package.json
CHANGED