Keep paragraph formatting and checklist todos when removing canvas pages, and preserve accepted undo/redo history after oversized input is rejected. Merge restored queued text into the latest conversation draft and retain image delivery when OCR returns image references and generated warnings only. Deliver session MCP servers to bridged remote Continue Execute while keeping Ask read-only and preserving local model-profile isolation. Add regression coverage and update feature documentation. Correct stale conversation-limit and forced-color assertions and the measured Electron layout test deadline. Validation: 4,826 tests passed, 67 skipped; full typecheck and lint passed. Current-source Linux x64 Execute/Ask/Execute MCP delivery passed, using 10 real text-provider requests and no image-provider requests. Image generation itself was not exercised. Staged whitespace checks passed before commit. Release note: 修复恢复队列时覆盖新输入、画布删页丢失清单格式及超限输入清空撤销历史的问题;图片 OCR 无正文时保留原图发送方式,远程 Continue Execute 正确保留会话 MCP 工具。
24 lines
903 B
TypeScript
24 lines
903 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { hasExtractedDocumentText } from './document-extracted-text'
|
|
|
|
describe('extracted document text', () => {
|
|
it.each([
|
|
'',
|
|
' \n ',
|
|
'',
|
|
'[第 1 页图片未保存:未返回内联图片字节]',
|
|
'\n[第 1 页图片未保存:图片格式不支持]',
|
|
'<p> </p>\n[第 2 页图片未保存:Base64 无效]'
|
|
])('does not count image references or generated warnings as text: %s', (content) => {
|
|
expect(hasExtractedDocumentText(content)).toBe(false)
|
|
})
|
|
|
|
it.each([
|
|
'Recognized text',
|
|
'\n实际正文\n[第 1 页图片未保存:Base64 无效]',
|
|
'<table><tr><td>实际表格</td></tr></table>'
|
|
])('retains recognized text: %s', (content) => {
|
|
expect(hasExtractedDocumentText(content)).toBe(true)
|
|
})
|
|
})
|