()
| 50 | } |
| 51 | }; |
| 52 | const copy = async () => { |
| 53 | try { |
| 54 | if (!navigator.clipboard?.writeText) throw new Error('Clipboard unavailable; select the draft and copy it manually.'); |
| 55 | await navigator.clipboard.writeText(report); setStatus('Edited report copied locally. Nothing was sent.'); |
| 56 | } catch (reason) { setStatus(reason instanceof Error ? reason.message : String(reason)); } |
| 57 | }; |
| 58 | const download = () => { |
| 59 | const url = URL.createObjectURL(new Blob([report], { type: 'text/plain;charset=utf-8' })); |
| 60 | const anchor = document.createElement('a'); anchor.href = url; anchor.download = 'local-index-diagnosis.txt'; |
no test coverage detected