MCPcopy Create free account
hub / github.com/astercloud/aster / extractActiveTaskTitleWeb

Function extractActiveTaskTitleWeb

examples/plan-explore-ui/static/main.js:215–230  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

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 "";

Callers 1

renderToolStartWebFunction · 0.85

Calls 1

getStringArgWebFunction · 0.85

Tested by

no test coverage detected