Download web/src/assistant/askPending.ts from fsanyoto/loopable: direct link, hf CLI and curl.
- Browser
- Download file 395 Bytes
-
https://huggingface.co/spaces/fsanyoto/loopable/resolve/9291c0100f4e7b8da2efcbbf1ebdea72ee1663e7/web/src/assistant/askPending.ts
- Command line
-
hf download hf://spaces/fsanyoto/loopable@9291c0100f4e7b8da2efcbbf1ebdea72ee1663e7/web/src/assistant/askPending.ts
-
curl -L -o askPending.ts https://huggingface.co/spaces/fsanyoto/loopable/resolve/9291c0100f4e7b8da2efcbbf1ebdea72ee1663e7/web/src/assistant/askPending.ts
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; | |
| } | |
| } | |