feat: add image hash-based OCR caching with 100MB size limit

- Implement SHA-256 image hashing to cache OCR results and avoid re-processing identical images
- Add 100MB file size limit for image uploads with user-friendly error messages
- Clear ghost suggestions when uploading new images to prevent interference
- Optimize size limit calculation in copilot plugin to include OCR context
- Remove debug logging from production code
- Add image processing optimization plan document

BREAKING CHANGE: Image upload size limit is now enforced at 100MB (previously unlimited)
This commit is contained in:
2026-02-15 22:17:37 +08:00
parent 190bb2b756
commit 1e58c18bbc
7 changed files with 161 additions and 96 deletions
+1 -4
View File
@@ -46,7 +46,7 @@ Hard rules:
Do NOT repeat text that already appears at the start of SUFFIX.
3. Balanced length:
Prefer concise but meaningful continuation, not ultra-short fragments.
Default target is 20-120 characters and 1-3 lines for plain prose.
Default target is 10-500 characters and 1-20 lines for plain prose.
You may be longer when structure requires it (lists, tables, code blocks, math blocks).
4. Avoid trivial output:
Do not output only punctuation or filler such as ".", ",", ";", ":".
@@ -89,6 +89,3 @@ Now produce the insertion.
Output:"""
return prompt.strip()