You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm before destructive Re-convert action (#20) (#26)
Add a Services.prompt.confirmEx dialog before the Re-convert (replace)
menu action runs. Default opt-out via "Don't ask again" checkbox stored
in the new `confirmReconvert` pref.
Rationale: Re-convert silently deletes the existing markdown attachment
and starts fresh. An accidental click is cheap for users running the
standard pipeline locally (seconds of compute) but expensive for users
on long VLM batches or paired with a remote LLM API (hours of compute,
possibly substantial spend). The plugin's other destructive action
(Reset preferences) already prompts; this brings Re-convert in line.
Implementation notes:
- Confirm fires inside runBatch after the filter that drops PDFs with
no matching .md, so the count in the dialog ("on N selected PDFs")
reflects the actual destructive count.
- Confirm fires before setting `batchInFlight`, so cancelling is a
clean no-op with no flag to clear.
- Button-flag constants fall back to literal values if the
Components.interfaces.nsIPromptService constants are absent (Z9
exposes them but defending against future runtime changes is cheap).
- "Don't ask again" persistence uses setPref; Reset to defaults already
iterates ALL_PREF_KEYS so the new pref restores there.
Closes#20
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mayank Vats <18255879+max3925vats@users.noreply.github.com>
constbody=`This will delete the existing markdown attachment${count===1 ? "" : "s"} on ${count} selected PDF${count===1 ? "" : "s"} and run conversion again. Any manual edits to the existing markdown will be lost.`;
0 commit comments