(draftID: string)
| 344 | } |
| 345 | |
| 346 | function draftStorage(draftID: string) { |
| 347 | const head = (draftID.slice(0, 12) || "draft").replace(/[^a-zA-Z0-9._-]/g, "-") |
| 348 | const sum = checksum(draftID) ?? "0" |
| 349 | return `opencode.draft.${head}.${sum}.dat` |
| 350 | } |
| 351 | |
| 352 | function windowStorage(windowID: string) { |
| 353 | const safe = (windowID || "browser").replace(/[^a-zA-Z0-9._-]/g, "-") |