(args)
| 213 | } |
| 214 | |
| 215 | function extractActiveTaskTitleWeb(args) { |
| 216 | const todos = args.todos; |
| 217 | if (!Array.isArray(todos)) return ""; |
| 218 | |
| 219 | for (const item of todos) { |
| 220 | if (!item || typeof item !== "object") continue; |
| 221 | const status = getStringArgWeb(item, "status"); |
| 222 | if (status === "in_progress") { |
| 223 | const activeForm = getStringArgWeb(item, "activeForm"); |
| 224 | if (activeForm) return activeForm; |
| 225 | const content = getStringArgWeb(item, "content"); |
| 226 | if (content) return content; |
| 227 | } |
| 228 | } |
| 229 | return ""; |
| 230 | } |
| 231 | |
| 232 | function getStringArgWeb(obj, key) { |
| 233 | if (!obj || typeof obj !== "object") return ""; |
no test coverage detected