runloopable / web /src /assistant /askPending.ts
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
89af3b2 verified
Raw History Blame Contribute Delete
395 Bytes
const PENDING_ASK_KEY = "loopable.ask.pending";
/** Clear the handoff before returning it so repeated effects cannot send it twice. */
export function takePendingAsk(): string | null {
try {
const pending = sessionStorage.getItem(PENDING_ASK_KEY);
sessionStorage.removeItem(PENDING_ASK_KEY);
return pending?.trim().slice(0, 500).trim() || null;
} catch {
return null;
}
}