INNER CODE UNIT · TypeScript
actions
pranshuchittora/simvyn · extensions/simvyn/index.ts:327
const actions = ["start", "stop", "status"].filter((action) => action.startsWith(prefix));
return actions.length > 0
? actions.map((action) => ({ value: action, label: action }))
: null;
},
handler: async (args, ctx) => {
const [action = "start", port = "3847"] = args.trim().split(/\s+/).filter(Boolean);
const dashboard = runningDashboard();
if (action === "status") {
ctx.ui.notify(
dashboard
? `simvyn dashboard running at ${dashboard.url}`
: "simvyn dashboard is not running from Pi",
"info",
);
return;
}