fix(desktop): add precise local OCR reading
This commit is contained in:
parent
59cdddbecb
commit
25fd3ac004
30 changed files with 626 additions and 15 deletions
|
|
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Additional Whisper model management UI
|
- Additional Whisper model management UI
|
||||||
- Plugin system for custom pipelines
|
- Plugin system for custom pipelines
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Screen OCR reconstructs tightly spaced URL, email and punctuation tokens from their pixel positions instead of inserting a space between every recognized word. Ordinary word spacing is preserved; unrecognized glyphs are not guessed or rewritten.
|
||||||
|
- Add an on-demand precise-reading action to screen OCR. Only the selected crop goes to a loopback GLM-OCR model; the first action downloads about 2.7 GB, original text remains available, and failed, truncated, repeated or cancelled results never replace it.
|
||||||
|
|
||||||
|
|
||||||
## [1.18.4] - 2026-11-20
|
## [1.18.4] - 2026-11-20
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@ const OVERLAY_STRING_KEYS = [
|
||||||
'modeRect',
|
'modeRect',
|
||||||
'copy',
|
'copy',
|
||||||
'copyLine',
|
'copyLine',
|
||||||
|
'precision',
|
||||||
|
'workingPrecision',
|
||||||
|
'resultPrecision',
|
||||||
|
'errorPrecision',
|
||||||
'copyImage',
|
'copyImage',
|
||||||
'saveImage',
|
'saveImage',
|
||||||
'savePdf',
|
'savePdf',
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
// 창 · 파일 · 클립보드 · LLM · TTS 는 전부 포트로 받는다(Electron 어댑터는 screen-ocr/electron-adapters.ts).
|
// 창 · 파일 · 클립보드 · LLM · TTS 는 전부 포트로 받는다(Electron 어댑터는 screen-ocr/electron-adapters.ts).
|
||||||
//
|
//
|
||||||
// 사생활: 캡처한 그림은 인식에 쓰는 임시 파일 하나로만 디스크에 닿고, 인식이 끝나면 곧바로 지운다.
|
// 사생활: 캡처한 그림은 인식에 쓰는 임시 파일 하나로만 디스크에 닿고, 인식이 끝나면 곧바로 지운다.
|
||||||
// 닫으면 메모리의 그림도 놓는다. 어디에도 보내지 않는다(번역·요약은 사용자가 고른 글자만 LLM 으로 간다).
|
// 닫으면 메모리의 그림도 놓는다. 정밀 읽기는 선택 영역의 그림만 루프백 GLM-OCR로 본다.
|
||||||
|
// 원격 Ollama는 차단한다. 어디에도 보내지 않는다(번역·요약은 사용자가 고른 글자만 LLM 으로 간다).
|
||||||
|
|
||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import { randomUUID } from 'crypto'
|
import { randomUUID } from 'crypto'
|
||||||
|
|
@ -24,6 +25,8 @@ import {
|
||||||
} from '@d3ro/core/screen-ocr'
|
} from '@d3ro/core/screen-ocr'
|
||||||
import { getLogger } from './LoggerService'
|
import { getLogger } from './LoggerService'
|
||||||
import type { OcrEnginePort } from './screen-ocr/windows-ocr-engine'
|
import type { OcrEnginePort } from './screen-ocr/windows-ocr-engine'
|
||||||
|
import type { PrecisionOcrEnginePort } from './screen-ocr/ollama-precision-engine'
|
||||||
|
import { isPrecisionOutputWithinBounds, unwrapOcrCodeFence } from './screen-ocr/precision-output'
|
||||||
|
|
||||||
const logger = getLogger('ScreenOcrService')
|
const logger = getLogger('ScreenOcrService')
|
||||||
|
|
||||||
|
|
@ -70,6 +73,7 @@ export interface ScreenOcrFilesPort {
|
||||||
export interface ScreenOcrDeps {
|
export interface ScreenOcrDeps {
|
||||||
capture: () => Promise<ScreenShot>
|
capture: () => Promise<ScreenShot>
|
||||||
engine: OcrEnginePort
|
engine: OcrEnginePort
|
||||||
|
precision: PrecisionOcrEnginePort
|
||||||
overlay: ScreenOcrOverlayPort
|
overlay: ScreenOcrOverlayPort
|
||||||
files: ScreenOcrFilesPort
|
files: ScreenOcrFilesPort
|
||||||
/** HTML 파일 → PDF */
|
/** HTML 파일 → PDF */
|
||||||
|
|
@ -130,6 +134,7 @@ export type ScreenOcrRequest =
|
||||||
| { type: 'copy-image'; rect: OcrRect | null }
|
| { type: 'copy-image'; rect: OcrRect | null }
|
||||||
| { type: 'save-image'; rect: OcrRect | null }
|
| { type: 'save-image'; rect: OcrRect | null }
|
||||||
| { type: 'save-pdf'; rect: OcrRect | null }
|
| { type: 'save-pdf'; rect: OcrRect | null }
|
||||||
|
| { type: 'refine-text'; text: string; rect: OcrRect | null }
|
||||||
| { type: 'translate'; text: string }
|
| { type: 'translate'; text: string }
|
||||||
| { type: 'summarize'; text: string }
|
| { type: 'summarize'; text: string }
|
||||||
| { type: 'speak'; text: string }
|
| { type: 'speak'; text: string }
|
||||||
|
|
@ -150,6 +155,7 @@ interface Session {
|
||||||
abort: AbortController
|
abort: AbortController
|
||||||
/** 인식을 다시 돌릴 때마다 올린다 — 늦게 끝난 옛 인식 결과를 버린다 */
|
/** 인식을 다시 돌릴 때마다 올린다 — 늦게 끝난 옛 인식 결과를 버린다 */
|
||||||
recognitionRound: number
|
recognitionRound: number
|
||||||
|
precisionPending: boolean
|
||||||
/** 이 캡처에서 읽어 주기를 시작했는지 — 닫을 때 그 읽기만 멈춘다(다른 기능의 재생은 건드리지 않는다) */
|
/** 이 캡처에서 읽어 주기를 시작했는지 — 닫을 때 그 읽기만 멈춘다(다른 기능의 재생은 건드리지 않는다) */
|
||||||
spoke: boolean
|
spoke: boolean
|
||||||
}
|
}
|
||||||
|
|
@ -230,6 +236,7 @@ export class ScreenOcrService extends EventEmitter {
|
||||||
result: null,
|
result: null,
|
||||||
abort: new AbortController(),
|
abort: new AbortController(),
|
||||||
recognitionRound: 0,
|
recognitionRound: 0,
|
||||||
|
precisionPending: false,
|
||||||
spoke: false
|
spoke: false
|
||||||
}
|
}
|
||||||
this._session = session
|
this._session = session
|
||||||
|
|
@ -373,6 +380,8 @@ export class ScreenOcrService extends EventEmitter {
|
||||||
}
|
}
|
||||||
case 'save-pdf':
|
case 'save-pdf':
|
||||||
return this._savePdf(session, request.rect)
|
return this._savePdf(session, request.rect)
|
||||||
|
case 'refine-text':
|
||||||
|
return this._refineText(session, request)
|
||||||
case 'translate': {
|
case 'translate': {
|
||||||
const text = this._requireText(request.text).slice(0, SCREEN_OCR_MAX_LLM_CHARS)
|
const text = this._requireText(request.text).slice(0, SCREEN_OCR_MAX_LLM_CHARS)
|
||||||
const target = pickTranslationTarget(
|
const target = pickTranslationTarget(
|
||||||
|
|
@ -426,6 +435,48 @@ export class ScreenOcrService extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async _refineText(
|
||||||
|
session: Session,
|
||||||
|
request: Extract<ScreenOcrRequest, { type: 'refine-text' }>
|
||||||
|
): Promise<{ ok: true; text: string } | { ok: false; error: ScreenOcrErrorKind }> {
|
||||||
|
if (session.precisionPending) return { ok: false, error: 'invalid' }
|
||||||
|
const source = this._requireText(request.text)
|
||||||
|
const area = this._areaOf(session, request.rect)
|
||||||
|
const png = area ? session.shot.crop(area) : session.shot.png
|
||||||
|
session.precisionPending = true
|
||||||
|
let tempPath: string | null = null
|
||||||
|
try {
|
||||||
|
tempPath = await this._deps.files.writeTemp(`${session.id}-precision-${randomUUID()}.png`, png)
|
||||||
|
session.abort.signal.throwIfAborted()
|
||||||
|
const raw = (await this._deps.precision.recognize({
|
||||||
|
imagePath: tempPath,
|
||||||
|
signal: session.abort.signal,
|
||||||
|
maxOutputTokens: Math.min(4096, Math.max(256, Math.ceil(source.length * 2)))
|
||||||
|
})).replace(/\r\n/gu, '\n').replace(/\n+$/u, '')
|
||||||
|
if (!isPrecisionOutputWithinBounds(raw, source)) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, 'Precision OCR returned an implausibly long result')
|
||||||
|
}
|
||||||
|
const text = unwrapOcrCodeFence(raw, source)
|
||||||
|
if (text.trim().length === 0) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, 'Precision OCR returned empty text')
|
||||||
|
}
|
||||||
|
return { ok: true, text }
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof D3ROError) throw error
|
||||||
|
throw new D3ROError(
|
||||||
|
ErrorCode.ScreenOcrRecognitionFailed,
|
||||||
|
`Precision OCR failed: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
)
|
||||||
|
} finally {
|
||||||
|
session.precisionPending = false
|
||||||
|
if (tempPath) {
|
||||||
|
await this._deps.files.remove(tempPath).catch((error: unknown) => {
|
||||||
|
logger.warn(`Precision OCR temp file cleanup failed: ${error instanceof Error ? error.message : String(error)}`)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async _savePdf(
|
private async _savePdf(
|
||||||
session: Session,
|
session: Session,
|
||||||
rect: OcrRect | null
|
rect: OcrRect | null
|
||||||
|
|
@ -507,6 +558,7 @@ export class ScreenOcrService extends EventEmitter {
|
||||||
case 'search-web':
|
case 'search-web':
|
||||||
return 'link'
|
return 'link'
|
||||||
case 'set-language':
|
case 'set-language':
|
||||||
|
case 'refine-text':
|
||||||
return 'recognition'
|
return 'recognition'
|
||||||
default:
|
default:
|
||||||
return 'export'
|
return 'export'
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import type {
|
||||||
ScreenShot
|
ScreenShot
|
||||||
} from '../ScreenOcrService'
|
} from '../ScreenOcrService'
|
||||||
import { createWindowsOcrEngine } from './windows-ocr-engine'
|
import { createWindowsOcrEngine } from './windows-ocr-engine'
|
||||||
|
import { createOllamaPrecisionOcrEngine } from './ollama-precision-engine'
|
||||||
|
|
||||||
const logger = getLogger('ScreenOcrAdapters')
|
const logger = getLogger('ScreenOcrAdapters')
|
||||||
|
|
||||||
|
|
@ -213,6 +214,7 @@ export function createScreenOcrDeps(
|
||||||
return {
|
return {
|
||||||
capture: captureDisplayAtCursor,
|
capture: captureDisplayAtCursor,
|
||||||
engine: createWindowsOcrEngine(),
|
engine: createWindowsOcrEngine(),
|
||||||
|
precision: createOllamaPrecisionOcrEngine(),
|
||||||
overlay,
|
overlay,
|
||||||
files: createFilesPort(dialogTitle, guard),
|
files: createFilesPort(dialogTitle, guard),
|
||||||
renderPdf: renderHtmlFileToPdf,
|
renderPdf: renderHtmlFileToPdf,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
import { readFile } from 'fs/promises'
|
||||||
|
import { D3ROError, ErrorCode } from '@d3ro/core/errors'
|
||||||
|
import { getLocalLLMService } from '../LocalLLMService'
|
||||||
|
import { getOllamaServerUrl } from '../LocalLLMService'
|
||||||
|
import { getLogger } from '../LoggerService'
|
||||||
|
import { readNdjsonLines } from '../../utils/ndjson-reader'
|
||||||
|
|
||||||
|
const MODEL = 'glm-ocr:latest'
|
||||||
|
const GENERATE_TIMEOUT_MS = 120_000
|
||||||
|
const DOWNLOAD_TIMEOUT_MS = 15 * 60_000
|
||||||
|
const MAX_OUTPUT_TOKENS = 4096
|
||||||
|
|
||||||
|
export interface PrecisionOcrRequest {
|
||||||
|
imagePath: string
|
||||||
|
signal?: AbortSignal
|
||||||
|
maxOutputTokens: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PrecisionOcrEnginePort {
|
||||||
|
recognize(request: PrecisionOcrRequest): Promise<string>
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Deps {
|
||||||
|
serverUrl?: string
|
||||||
|
model?: string
|
||||||
|
fetchFn?: typeof fetch
|
||||||
|
ensureRunning?: () => Promise<unknown>
|
||||||
|
readImage?: (path: string) => Promise<Buffer>
|
||||||
|
}
|
||||||
|
|
||||||
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||||
|
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function loopbackOnly(url: string): boolean {
|
||||||
|
try {
|
||||||
|
return ['127.0.0.1', 'localhost', '::1', '[::1]'].includes(new URL(url).hostname)
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function timeoutSignal(signal: AbortSignal | undefined, timeoutMs: number): AbortSignal {
|
||||||
|
return signal ? AbortSignal.any([signal, AbortSignal.timeout(timeoutMs)]) : AbortSignal.timeout(timeoutMs)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createOllamaPrecisionOcrEngine(deps: Deps = {}): PrecisionOcrEnginePort {
|
||||||
|
const serverUrl = (deps.serverUrl ?? getOllamaServerUrl()).replace(/\/$/u, '')
|
||||||
|
const model = deps.model ?? MODEL
|
||||||
|
const fetchFn = deps.fetchFn ?? fetch
|
||||||
|
const ensureRunning = deps.ensureRunning ?? (() => getLocalLLMService().ensureRunning())
|
||||||
|
const readImage = deps.readImage ?? readFile
|
||||||
|
const logger = getLogger('OllamaPrecisionOcr')
|
||||||
|
|
||||||
|
const request = async (path: string, init: RequestInit, signal: AbortSignal): Promise<Response> => {
|
||||||
|
try {
|
||||||
|
return await fetchFn(`${serverUrl}${path}`, { ...init, signal })
|
||||||
|
} catch (error) {
|
||||||
|
throw new D3ROError(
|
||||||
|
ErrorCode.ScreenOcrRecognitionFailed,
|
||||||
|
`Local precision OCR request failed: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const hasModel = async (signal?: AbortSignal): Promise<boolean> => {
|
||||||
|
const response = await request('/api/tags', { method: 'GET' }, timeoutSignal(signal, 10_000))
|
||||||
|
if (!response.ok) return false
|
||||||
|
const body: unknown = await response.json()
|
||||||
|
if (!isRecord(body) || !Array.isArray(body.models)) return false
|
||||||
|
return body.models.some((entry) => isRecord(entry) && entry.name === model)
|
||||||
|
}
|
||||||
|
|
||||||
|
const pullModel = async (signal?: AbortSignal): Promise<void> => {
|
||||||
|
logger.info(`GLM-OCR 모델 다운로드 시작: ${model}`)
|
||||||
|
const response = await request(
|
||||||
|
'/api/pull',
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'content-type': 'application/json' },
|
||||||
|
body: JSON.stringify({ model, stream: true })
|
||||||
|
},
|
||||||
|
timeoutSignal(signal, DOWNLOAD_TIMEOUT_MS)
|
||||||
|
)
|
||||||
|
if (!response.ok || !response.body) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrUnavailable, `GLM-OCR download failed with HTTP ${response.status}`)
|
||||||
|
}
|
||||||
|
const reader = response.body.getReader()
|
||||||
|
const cancel = (): void => {
|
||||||
|
void reader.cancel().catch(() => undefined)
|
||||||
|
}
|
||||||
|
signal?.addEventListener('abort', cancel, { once: true })
|
||||||
|
let succeeded = false
|
||||||
|
try {
|
||||||
|
for await (const line of readNdjsonLines(reader)) {
|
||||||
|
if (line.length > 64 * 1024) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, 'GLM-OCR download returned an oversized status line')
|
||||||
|
}
|
||||||
|
const chunk: unknown = JSON.parse(line)
|
||||||
|
if (!isRecord(chunk)) continue
|
||||||
|
if (typeof chunk.error === 'string') {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrUnavailable, `GLM-OCR download failed: ${chunk.error}`)
|
||||||
|
}
|
||||||
|
if (chunk.status === 'success') succeeded = true
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
signal?.removeEventListener('abort', cancel)
|
||||||
|
reader.releaseLock()
|
||||||
|
}
|
||||||
|
if (!succeeded) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrUnavailable, 'GLM-OCR download ended without success')
|
||||||
|
}
|
||||||
|
logger.info('GLM-OCR 모델 다운로드 완료')
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
async recognize({ imagePath, signal, maxOutputTokens }): Promise<string> {
|
||||||
|
try {
|
||||||
|
if (!loopbackOnly(serverUrl)) {
|
||||||
|
throw new D3ROError(
|
||||||
|
ErrorCode.ScreenOcrUnavailable,
|
||||||
|
'Precision OCR requires a loopback Ollama server so screenshots stay on this PC'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
await ensureRunning()
|
||||||
|
if (!(await hasModel(signal))) await pullModel(signal)
|
||||||
|
const image = await readImage(imagePath)
|
||||||
|
const numPredict = Math.min(MAX_OUTPUT_TOKENS, Math.max(256, Math.floor(maxOutputTokens)))
|
||||||
|
const response = await request(
|
||||||
|
'/api/generate',
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'content-type': 'application/json' },
|
||||||
|
body: JSON.stringify({
|
||||||
|
model,
|
||||||
|
prompt: 'Text Recognition:',
|
||||||
|
images: [image.toString('base64')],
|
||||||
|
stream: false,
|
||||||
|
keep_alive: '2m',
|
||||||
|
options: { temperature: 0, num_ctx: 8192, num_predict: numPredict }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
timeoutSignal(signal, GENERATE_TIMEOUT_MS)
|
||||||
|
)
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, `GLM-OCR returned HTTP ${response.status}`)
|
||||||
|
}
|
||||||
|
const body: unknown = await response.json()
|
||||||
|
if (!isRecord(body) || body.done !== true || body.done_reason !== 'stop' || typeof body.response !== 'string') {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, 'GLM-OCR returned an incomplete or truncated result')
|
||||||
|
}
|
||||||
|
if (body.response.trim().length === 0) {
|
||||||
|
throw new D3ROError(ErrorCode.ScreenOcrRecognitionFailed, 'GLM-OCR returned empty text')
|
||||||
|
}
|
||||||
|
return body.response
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof D3ROError) throw error
|
||||||
|
throw new D3ROError(
|
||||||
|
ErrorCode.ScreenOcrRecognitionFailed,
|
||||||
|
`Precision OCR failed: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
export function unwrapOcrCodeFence(raw: string, source: string): string {
|
||||||
|
const lines = raw.split('\n')
|
||||||
|
if (lines.length < 3 || source.includes('```')) return raw
|
||||||
|
if (!/^```[A-Za-z0-9_+.-]*$/u.test(lines[0].trim()) || lines[lines.length - 1].trim() !== '```') return raw
|
||||||
|
const body = lines.slice(1, -1).join('\n')
|
||||||
|
return body.includes('```') ? raw : body
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isPrecisionOutputWithinBounds(raw: string, source: string): boolean {
|
||||||
|
return Array.from(raw).length <= Math.max(4000, Array.from(source).length * 8)
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
<div id="actions" class="d3-panel bar" role="toolbar">
|
<div id="actions" class="d3-panel bar" role="toolbar">
|
||||||
<button id="act-copy" class="act primary" type="button" data-i18n="copy"></button>
|
<button id="act-copy" class="act primary" type="button" data-i18n="copy"></button>
|
||||||
<button id="act-copy-line" class="act" type="button" data-i18n="copyLine"></button>
|
<button id="act-copy-line" class="act" type="button" data-i18n="copyLine"></button>
|
||||||
|
<button id="act-refine" class="act" type="button" data-i18n="precision" data-i18n-label="workingPrecision"></button>
|
||||||
<button id="act-translate" class="act" type="button" data-i18n="translate"></button>
|
<button id="act-translate" class="act" type="button" data-i18n="translate"></button>
|
||||||
<button id="act-summarize" class="act" type="button" data-i18n="summarize"></button>
|
<button id="act-summarize" class="act" type="button" data-i18n="summarize"></button>
|
||||||
<button id="act-speak" class="act" type="button" data-i18n="speak"></button>
|
<button id="act-speak" class="act" type="button" data-i18n="speak"></button>
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ const state = {
|
||||||
region: null,
|
region: null,
|
||||||
drag: null,
|
drag: null,
|
||||||
speaking: false,
|
speaking: false,
|
||||||
|
precisionRunning: false,
|
||||||
i18n: {},
|
i18n: {},
|
||||||
nextRequestId: 1,
|
nextRequestId: 1,
|
||||||
pending: new Map(),
|
pending: new Map(),
|
||||||
|
|
@ -193,6 +194,7 @@ function renderActions() {
|
||||||
for (const id of ['act-copy', 'act-copy-line', 'act-translate', 'act-summarize', 'act-speak', 'act-link']) {
|
for (const id of ['act-copy', 'act-copy-line', 'act-translate', 'act-summarize', 'act-speak', 'act-link']) {
|
||||||
$(id).disabled = !hasText
|
$(id).disabled = !hasText
|
||||||
}
|
}
|
||||||
|
$('act-refine').disabled = !hasText || state.precisionRunning
|
||||||
$('act-select-all').disabled = !state.result || state.result.words.length === 0
|
$('act-select-all').disabled = !state.result || state.result.words.length === 0
|
||||||
$('act-link').textContent = hasText && detectLinks(text).length > 0 ? tr('openLink') : tr('search')
|
$('act-link').textContent = hasText && detectLinks(text).length > 0 ? tr('openLink') : tr('search')
|
||||||
$('act-speak').textContent = state.speaking ? tr('stopSpeak') : tr('speak')
|
$('act-speak').textContent = state.speaking ? tr('stopSpeak') : tr('speak')
|
||||||
|
|
@ -460,6 +462,27 @@ async function runLlm(type, title) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function refineText() {
|
||||||
|
const text = selectedText(false)
|
||||||
|
if (!text.trim() || state.precisionRunning) return
|
||||||
|
state.precisionRunning = true
|
||||||
|
renderActions()
|
||||||
|
openResult(tr('resultPrecision'))
|
||||||
|
resultBody.textContent = tr('workingPrecision')
|
||||||
|
const response = await request({ type: 'refine-text', text, rect: exportRegion() })
|
||||||
|
state.precisionRunning = false
|
||||||
|
renderActions()
|
||||||
|
if (resultEl.hidden) return
|
||||||
|
if (response.ok && typeof response.text === 'string') {
|
||||||
|
resultBody.textContent = response.text
|
||||||
|
resultBody.className = 'result-body'
|
||||||
|
$('result-copy').disabled = false
|
||||||
|
} else {
|
||||||
|
resultBody.textContent = tr('errorPrecision')
|
||||||
|
resultBody.className = 'result-body error'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function toggleSpeak() {
|
async function toggleSpeak() {
|
||||||
if (state.speaking) {
|
if (state.speaking) {
|
||||||
state.speaking = false
|
state.speaking = false
|
||||||
|
|
@ -524,6 +547,7 @@ function resetSession() {
|
||||||
state.region = null
|
state.region = null
|
||||||
state.drag = null
|
state.drag = null
|
||||||
state.speaking = false
|
state.speaking = false
|
||||||
|
state.precisionRunning = false
|
||||||
shot.removeAttribute('src')
|
shot.removeAttribute('src')
|
||||||
toastEl.hidden = true
|
toastEl.hidden = true
|
||||||
closeResult()
|
closeResult()
|
||||||
|
|
@ -647,6 +671,7 @@ click('flip', () => {
|
||||||
})
|
})
|
||||||
click('act-copy', () => void copyText(false))
|
click('act-copy', () => void copyText(false))
|
||||||
click('act-copy-line', () => void copyText(true))
|
click('act-copy-line', () => void copyText(true))
|
||||||
|
click('act-refine', () => void refineText())
|
||||||
click('act-translate', () => void runLlm('translate', tr('resultTranslate')))
|
click('act-translate', () => void runLlm('translate', tr('resultTranslate')))
|
||||||
click('act-summarize', () => void runLlm('summarize', tr('resultSummary')))
|
click('act-summarize', () => void runLlm('summarize', tr('resultSummary')))
|
||||||
click('act-speak', () => void toggleSpeak())
|
click('act-speak', () => void toggleSpeak())
|
||||||
|
|
|
||||||
113
apps/desktop/tests/main/services/ollama-precision-engine.test.ts
Normal file
113
apps/desktop/tests/main/services/ollama-precision-engine.test.ts
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
import { describe, expect, it, vi } from 'vitest'
|
||||||
|
import { ErrorCode } from '@d3ro/core/errors'
|
||||||
|
import { createOllamaPrecisionOcrEngine } from '../../../src/main/services/screen-ocr/ollama-precision-engine'
|
||||||
|
|
||||||
|
type Handler = (url: string, init?: RequestInit) => Promise<Response>
|
||||||
|
|
||||||
|
function json(body: unknown): Response {
|
||||||
|
return new Response(JSON.stringify(body), { status: 200, headers: { 'content-type': 'application/json' } })
|
||||||
|
}
|
||||||
|
|
||||||
|
function harness(handler: Handler) {
|
||||||
|
const calls: string[] = []
|
||||||
|
const fetchFn: typeof fetch = async (input, init) => {
|
||||||
|
const url = String(input)
|
||||||
|
calls.push(url)
|
||||||
|
return handler(url, init)
|
||||||
|
}
|
||||||
|
const ensureRunning = vi.fn(async () => 'running')
|
||||||
|
const engine = createOllamaPrecisionOcrEngine({
|
||||||
|
serverUrl: 'http://127.0.0.1:11434',
|
||||||
|
fetchFn,
|
||||||
|
ensureRunning,
|
||||||
|
readImage: async () => Buffer.from('image')
|
||||||
|
})
|
||||||
|
return { engine, calls, ensureRunning }
|
||||||
|
}
|
||||||
|
|
||||||
|
const modelPresent = json({ models: [{ name: 'glm-ocr:latest' }] })
|
||||||
|
const generated = (text: string, reason = 'stop') => json({ done: true, done_reason: reason, response: text })
|
||||||
|
|
||||||
|
describe('Ollama 정밀 OCR 엔진', () => {
|
||||||
|
it('정밀인식_모델이있으면_다운로드없이공식프롬프트와로컬이미지로호출한다', async () => {
|
||||||
|
const requests: Array<{ url: string; body: Record<string, unknown> }> = []
|
||||||
|
const { engine, calls } = harness(async (url, init) => {
|
||||||
|
if (url.endsWith('/api/tags')) return modelPresent
|
||||||
|
if (url.endsWith('/api/generate')) {
|
||||||
|
requests.push({ url, body: JSON.parse(String(init?.body)) as Record<string, unknown> })
|
||||||
|
return generated('정확한 결과')
|
||||||
|
}
|
||||||
|
throw new Error(`unexpected ${url}`)
|
||||||
|
})
|
||||||
|
const result = await engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 1024 })
|
||||||
|
expect(result).toBe('정확한 결과')
|
||||||
|
expect(calls.some((url) => url.endsWith('/api/pull'))).toBe(false)
|
||||||
|
expect(requests[0].body).toMatchObject({
|
||||||
|
model: 'glm-ocr:latest',
|
||||||
|
prompt: 'Text Recognition:',
|
||||||
|
images: [Buffer.from('image').toString('base64')],
|
||||||
|
stream: false,
|
||||||
|
keep_alive: '2m',
|
||||||
|
options: { temperature: 0, num_ctx: 8192, num_predict: 1024 }
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀인식_모델이없으면_다운로드를완료한뒤인식한다', async () => {
|
||||||
|
const { engine, calls } = harness(async (url) => {
|
||||||
|
if (url.endsWith('/api/tags')) return json({ models: [] })
|
||||||
|
if (url.endsWith('/api/pull')) return new Response('{"status":"downloading"}\n{"status":"success"}\n')
|
||||||
|
if (url.endsWith('/api/generate')) return generated('결과')
|
||||||
|
throw new Error(`unexpected ${url}`)
|
||||||
|
})
|
||||||
|
await expect(engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 512 })).resolves.toBe('결과')
|
||||||
|
expect(calls.findIndex((url) => url.endsWith('/api/pull'))).toBeLessThan(calls.findIndex((url) => url.endsWith('/api/generate')))
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀인식_토큰한도로잘린결과_성공으로처리하지않는다', async () => {
|
||||||
|
const { engine } = harness(async (url) => url.endsWith('/api/tags') ? modelPresent : generated('불완전한 결과', 'length'))
|
||||||
|
await expect(engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 512 })).rejects.toMatchObject({
|
||||||
|
code: ErrorCode.ScreenOcrRecognitionFailed
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀인식_빈결과_성공으로처리하지않는다', async () => {
|
||||||
|
const { engine } = harness(async (url) => url.endsWith('/api/tags') ? modelPresent : generated(' \n'))
|
||||||
|
await expect(engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 512 })).rejects.toMatchObject({
|
||||||
|
code: ErrorCode.ScreenOcrRecognitionFailed
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀인식_원격Ollama주소_화면을볼내지않고차단한다', async () => {
|
||||||
|
const fetchFn = vi.fn(async () => json({}))
|
||||||
|
const engine = createOllamaPrecisionOcrEngine({
|
||||||
|
serverUrl: 'https://ollama.example.com',
|
||||||
|
fetchFn,
|
||||||
|
ensureRunning: async () => 'running',
|
||||||
|
readImage: async () => Buffer.from('image')
|
||||||
|
})
|
||||||
|
await expect(engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 512 })).rejects.toMatchObject({
|
||||||
|
code: ErrorCode.ScreenOcrUnavailable
|
||||||
|
})
|
||||||
|
expect(fetchFn).not.toHaveBeenCalled()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀인식_다운로드중취소_인식을시작하지않는다', async () => {
|
||||||
|
const controller = new AbortController()
|
||||||
|
let pullStarted = false
|
||||||
|
const { engine, calls } = harness(async (url, init) => {
|
||||||
|
if (url.endsWith('/api/tags')) return json({ models: [] })
|
||||||
|
if (url.endsWith('/api/pull')) {
|
||||||
|
pullStarted = true
|
||||||
|
return new Promise<Response>((_resolve, reject) => {
|
||||||
|
init?.signal?.addEventListener('abort', () => reject(new Error('aborted')), { once: true })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return generated('실행하면 안 되는 결과')
|
||||||
|
})
|
||||||
|
const pending = engine.recognize({ imagePath: 'crop.png', maxOutputTokens: 512, signal: controller.signal })
|
||||||
|
await vi.waitFor(() => expect(pullStarted).toBe(true))
|
||||||
|
controller.abort()
|
||||||
|
await expect(pending).rejects.toMatchObject({ code: ErrorCode.ScreenOcrRecognitionFailed })
|
||||||
|
expect(calls.some((url) => url.endsWith('/api/generate'))).toBe(false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
@ -47,6 +47,7 @@ interface HarnessOptions {
|
||||||
/** 인식을 곧바로 끝낼지 (기본 true). false 면 finishRecognition 을 부를 때까지 걸려 있다. */
|
/** 인식을 곧바로 끝낼지 (기본 true). false 면 finishRecognition 을 부를 때까지 걸려 있다. */
|
||||||
autoRecognize?: boolean
|
autoRecognize?: boolean
|
||||||
openExternal?: (url: string) => Promise<boolean>
|
openExternal?: (url: string) => Promise<boolean>
|
||||||
|
precision?: ScreenOcrDeps['precision']['recognize']
|
||||||
translate?: ScreenOcrDeps['llm']['translate']
|
translate?: ScreenOcrDeps['llm']['translate']
|
||||||
renderPdf?: ScreenOcrDeps['renderPdf']
|
renderPdf?: ScreenOcrDeps['renderPdf']
|
||||||
clipboardError?: Error
|
clipboardError?: Error
|
||||||
|
|
@ -93,6 +94,7 @@ function createHarness(options: HarnessOptions = {}): Harness {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
precision: { recognize: options.precision ?? (async () => '정밀 결과') },
|
||||||
overlay: {
|
overlay: {
|
||||||
show: (bounds, payload) => shown.push({ bounds, payload }),
|
show: (bounds, payload) => shown.push({ bounds, payload }),
|
||||||
sendRecognized: (payload) => recognized.push(payload),
|
sendRecognized: (payload) => recognized.push(payload),
|
||||||
|
|
@ -472,6 +474,77 @@ describe('ScreenOcrService 요청 처리', () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('GLM-OCR 선택 영역 정밀 읽기', () => {
|
||||||
|
it('정밀읽기_선택영역_크롭만모델에볼내고임시파일을정리한다', async () => {
|
||||||
|
const h = createHarness({
|
||||||
|
precision: async (request) => {
|
||||||
|
expect(h.temp.get(request.imagePath)?.toString()).toBe('crop-10-20-100-40')
|
||||||
|
expect(request.maxOutputTokens).toBe(256)
|
||||||
|
return '정확한 결과'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await open(h)
|
||||||
|
await h.service.handleRequest(h.sessionId(), 1, {
|
||||||
|
type: 'refine-text',
|
||||||
|
text: '원문',
|
||||||
|
rect: { x: 10, y: 20, width: 100, height: 40 }
|
||||||
|
})
|
||||||
|
expect(h.responses).toEqual([{ requestId: 1, ok: true, text: '정확한 결과' }])
|
||||||
|
expect(h.temp.size).toBe(0)
|
||||||
|
expect(h.clipboard.text).toBeNull()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀읽기_모델이추가한바깥코드펜스_본문과원문에펜스가없으면제거한다', async () => {
|
||||||
|
const h = createHarness({ precision: async () => '```javascript\nconst x = 1;\n```' })
|
||||||
|
await open(h)
|
||||||
|
await h.service.handleRequest(h.sessionId(), 1, { type: 'refine-text', text: 'const x = 1;', rect: null })
|
||||||
|
expect(h.responses).toEqual([{ requestId: 1, ok: true, text: 'const x = 1;' }])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀읽기_원문에코드펜스가있으면_제거하지않는다', async () => {
|
||||||
|
const text = '```javascript\nconst x = 1;\n```'
|
||||||
|
const h = createHarness({ precision: async () => text })
|
||||||
|
await open(h)
|
||||||
|
await h.service.handleRequest(h.sessionId(), 1, { type: 'refine-text', text, rect: null })
|
||||||
|
expect(h.responses).toEqual([{ requestId: 1, ok: true, text }])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀읽기_비정상적으로긴 반복결과_실패로처리하고임시파일을정리한다', async () => {
|
||||||
|
const h = createHarness({ precision: async () => 'x'.repeat(4001) })
|
||||||
|
await open(h)
|
||||||
|
await h.service.handleRequest(h.sessionId(), 1, { type: 'refine-text', text: '짧음', rect: null })
|
||||||
|
expect(h.responses).toEqual([{ requestId: 1, ok: false, error: 'recognition' }])
|
||||||
|
expect(h.temp.size).toBe(0)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀읽기_요청이진행중일때_중복요청을거부한다', async () => {
|
||||||
|
let finish: ((text: string) => void) | undefined
|
||||||
|
const precision = vi.fn(() => new Promise<string>((resolve) => { finish = resolve }))
|
||||||
|
const h = createHarness({ precision })
|
||||||
|
await open(h)
|
||||||
|
const first = h.service.handleRequest(h.sessionId(), 1, { type: 'refine-text', text: '첫 요청', rect: null })
|
||||||
|
const second = h.service.handleRequest(h.sessionId(), 2, { type: 'refine-text', text: '둘째 요청', rect: null })
|
||||||
|
await second
|
||||||
|
finish?.('첫 결과')
|
||||||
|
await first
|
||||||
|
expect(precision).toHaveBeenCalledTimes(1)
|
||||||
|
expect(h.responses).toContainEqual({ requestId: 2, ok: false, error: 'invalid' })
|
||||||
|
expect(h.responses).toContainEqual({ requestId: 1, ok: true, text: '첫 결과' })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('정밀읽기_진행중닫기_응답을버리고임시파일을정리한다', async () => {
|
||||||
|
let finish: ((text: string) => void) | undefined
|
||||||
|
const h = createHarness({ precision: () => new Promise<string>((resolve) => { finish = resolve }) })
|
||||||
|
await open(h)
|
||||||
|
const pending = h.service.handleRequest(h.sessionId(), 1, { type: 'refine-text', text: '원문', rect: null })
|
||||||
|
h.service.close()
|
||||||
|
finish?.('늦은 결과')
|
||||||
|
await pending
|
||||||
|
expect(h.responses).toEqual([])
|
||||||
|
expect(h.temp.size).toBe(0)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('Windows OCR 엔진 어댑터', () => {
|
describe('Windows OCR 엔진 어댑터', () => {
|
||||||
it('엔진인식_정상출력_정본결과로옮기고입력은환경변수로만넘긴다', async () => {
|
it('엔진인식_정상출력_정본결과로옮기고입력은환경변수로만넘긴다', async () => {
|
||||||
const calls: Array<Record<string, string>> = []
|
const calls: Array<Record<string, string>> = []
|
||||||
|
|
|
||||||
|
|
@ -125,3 +125,47 @@
|
||||||
- 최초 게시는 `.env`의 Forgejo token이 실제 `/api/v1/user`에서도 HTTP 401이라 runtime feed gate에서 중단됐다. 공개 runtime은 무인증 HTTP 200이다. 기존 Git credential의 API 인증은 200이었고, 자격증명은 파일에 쓰거나 출력하지 않고 프로세스 메모리에서만 사용했다. checkpoint의 태그·SHA-256을 재검증하고 재빌드 없이 게시를 재개했다.
|
- 최초 게시는 `.env`의 Forgejo token이 실제 `/api/v1/user`에서도 HTTP 401이라 runtime feed gate에서 중단됐다. 공개 runtime은 무인증 HTTP 200이다. 기존 Git credential의 API 인증은 200이었고, 자격증명은 파일에 쓰거나 출력하지 않고 프로세스 메모리에서만 사용했다. checkpoint의 태그·SHA-256을 재검증하고 재빌드 없이 게시를 재개했다.
|
||||||
- 버전별 및 latest 설치본·서명 manifest·policy 업로드, 공개 signed-manifest 검증, Forgejo Release 3개 자산 첨부가 모두 성공했다. 공개 `latest/latest.yml`은 `1.18.4`, 설치본은 Range GET HTTP 206이다. Windows 차분 파일이 없으므로 policy `fullInstallVersionGap=0`도 게시됐다.
|
- 버전별 및 latest 설치본·서명 manifest·policy 업로드, 공개 signed-manifest 검증, Forgejo Release 3개 자산 첨부가 모두 성공했다. 공개 `latest/latest.yml`은 `1.18.4`, 설치본은 Range GET HTTP 206이다. Windows 차분 파일이 없으므로 policy `fullInstallVersionGap=0`도 게시됐다.
|
||||||
- 실행 중인 설치 앱은 여전히 1.17.1이며 새 버전의 업데이트 확인 로그는 아직 없다. 에이전트가 Electron을 실행하거나 종료하지 않았으므로 `설정 → 정보 → 업데이트`의 수동 확인과 제안/다운로드 화면은 사용자 검증으로 남는다. 다음 릴리스를 위해서는 만료된 `.env` token의 교체가 필요하다.
|
- 실행 중인 설치 앱은 여전히 1.17.1이며 새 버전의 업데이트 확인 로그는 아직 없다. 에이전트가 Electron을 실행하거나 종료하지 않았으므로 `설정 → 정보 → 업데이트`의 수동 확인과 제안/다운로드 화면은 사용자 검증으로 남는다. 다음 릴리스를 위해서는 만료된 `.env` token의 교체가 필요하다.
|
||||||
|
|
||||||
|
|
||||||
|
## 2026-11-21 실제 업데이트 완료·OCR 품질 후속
|
||||||
|
|
||||||
|
- 실제 설치 앱 로그가 2026-11-20 22:48:56에 `1.18.4` 발견, 2026-11-21 07:03:10 전체 설치본 다운로드 시작, 07:03:25 서명 확인 완료·다운로드 완료, 07:03:35 `quitAndInstall`을 기록했다. 07:03:56에 재시작됐고 기존 `_local/d3ro.db`를 `created=false`로 정상 오픈했다. 07:04:17에는 현재 버전 `1.18.4`가 최신이라고 확인했다.
|
||||||
|
- 설치된 `C:\Users\encep\AppData\Local\Programs\@d3rodesktop\D3RO Voice.exe`의 ProductVersion은 `1.18.4.0`이다. 사용자가 실제로 화면 OCR을 두 번 실행했고 07:36:04·07:36:55에 오버레이 생성과 각각 959·933개 단어 인식이 로그에 남았다. 제외한 네이티브 모듈을 포함한 실제 GUI 실행 증거이며, OCR 인식 품질 자체는 아래의 별도 결함으로 남긴다.
|
||||||
|
- 사용자가 보고한 특수문자·정확도 문제는 음성 전사가 아니라 화면 OCR 경로에서 조사했다(같은 시각의 로그에 음성 전사가 아니라 화면 OCR 호출이 있었다). Windows가 제공하는 인식 언어는 `ko` 하나뿐이었다.
|
||||||
|
- 알려진 한국어·영어·코드·기호 혼합 합성 표본으로 실제 Windows.Media.Ocr을 호출해 `0`→`@`, `off`→`0千千`, `foo`→`千00`, `→`→`“`를 재현했다. 2배에서 4배로 키워도 해결되지 않았다. 엔진의 문자 출력을 추측성 규칙으로 치환하지 않는다.
|
||||||
|
- `selectionText`가 모든 단어 사이에 공백을 넣어 URL과 이메일이 `"https ://… ?…"`, `…example. co. kr`처럼 복사되던 문제는 단어 상자의 픽셀 간격을 이용해 수정했다. 일반 단어의 좁은 띄어쓰기를 유지하는 대조 테스트를 포함한다. 새 테스트는 수정 전에 실패했고 수정 후 core 37개, 전체 core 40 files / 666 tests, desktop OCR 39 tests가 GREEN이다. 이 소스 수정은 아직 설치된 1.18.4에는 포함되지 않았다.
|
||||||
|
- 고대비 이진화는 코드 표본에서 `off`, `>=`, `items[0]`를 개선했지만 한국어 표본에서 문장 부호 줄을 놓치고 URL의 큰따옴표를 작은따옴표로 바꿨다. 다크 모드에서도 개선과 퇴행이 섞여 있어 제품에 적용하지 않고 시험 산출물을 삭제했다. 인식 언어·모델 개선과 실제 혼합 화면 평가는 `GAP-OCR-02`로 남긴다.
|
||||||
|
|
||||||
|
|
||||||
|
## 2026-11-21 오픈 모델 평가와 GLM 선택 영역 정밀 읽기
|
||||||
|
|
||||||
|
### 모델·표본·측정
|
||||||
|
|
||||||
|
- 현재 PC(RTX 3080 Ti 12GB, Ollama 0.40.5)에서 **GLM-OCR `89d735dd9c07`**을 날받았다. Ollama manifest의 모델+프로젝터 합계는 2,655,025,536 bytes다. 공식 가이드의 native `/api/generate`를 사용했다.
|
||||||
|
- PaddleOCR-VL-1.6은 공식 Hugging Face GGUF 두 파일을 받아 해시를 확인했다: 모델 `f3ae46ec885050acf4b3d31944431e1fd90d50664fb09126af4a3c050ba14ee8`, 프로젝터 `204d757d7610d9b3faab10d506d69e5b244e32bf765e2bab2d0167e65e0a058a`. 임시 llama-server만 사용하고 평가 후 종료했다.
|
||||||
|
- PP-OCRv5는 제품 사이드카와 분리된 Python 3.11 venv에 `paddlepaddle 3.3.1`/`paddleocr 3.7.0`을 설치했다. Windows PyPI에는 3.4.0이 없었고, oneDNN 오류는 해당 가속을 끄고 해결했다. 제품 사이드카 의존성은 바꾸지 않았다.
|
||||||
|
- 브라우저에서 실제 Consolas + Malgun fallback으로 그린 5개 표본(한·영 혼합 밝은/어두운 화면, 작은 코드, 한국어 UI, 특수문자)을 사용했다. ImageMagick의 한글 누락·원화 표기 표본은 평가에서 제외했다. 전체 화면과 선택 영역 크롭(2배 픽셀)을 구분했다.
|
||||||
|
- Levenshtein 문자 오류율을 전체 문자·비공백 문자·기호에 대해 각각 계산했다. 특수문자를 제거해 점수를 좋게 하지 않았고, `done_reason=length`/`finish_reason=length`는 성공으로 세지 않았다. 평균이 아닌 중앙값 시간을 아래에 적는다.
|
||||||
|
|
||||||
|
| Engine | Overall CER | Symbol CER | Median recognition time |
|
||||||
|
|---|---:|---:|---:|
|
||||||
|
| Windows.Media.Ocr (`ko`) | 32.29% | 43.23% | 0.894 s |
|
||||||
|
| PP-OCRv5 Korean (CPU, oneDNN off) | 14.35% | 19.91% | 8.390 s |
|
||||||
|
| PaddleOCR-VL-1.6, full | 4.94% | 10.81% | 19.485 s |
|
||||||
|
| PaddleOCR-VL-1.6, crop | 2.99% | 4.32% | 22.148 s |
|
||||||
|
| GLM-OCR, crop | 5.08% | 5.46% | 3.740 s |
|
||||||
|
|
||||||
|
- GLM은 첫 혼합 화면에서 546자와 기호 122개가 모두 일치했다. 첫 cold 요청 102.8초의 구성은 모델 로딩 2.6초, 이미지 처리 61.9초, 생성 38.3초였다. 전체 큰 코드 화면은 초기 `num_ctx=4096` 부족으로 실패해 8192로 늘려 확인했다.
|
||||||
|
- GLM은 한국어 UI의 일부 드문 글자를 틀리고 특수기호를 LaTeX 또는 반복 생성으로 출력했다. **따라서 전체 화면 자동 교체는 채택하지 않았다.** `literal` 지시 프롬프트도 코드 펜스와 반복 생성을 없애지 못하고 일부 문자를 바꿔 공식 `Text Recognition:` 프롬프트를 유지했다.
|
||||||
|
- Paddle은 crop에서도 코드의 따옴표·백틱·일부 연산자를 바꿨고 평균 약 20.89초였다. GLM은 코드 본문은 정확하지만 코드 펜스를 추가하는 경향이 있어, **원문·본문에 펜스가 없고 출력 전체가 한 겹의 코드 펜스인 경우에만 포장을 제거**한다. 실제 펜스가 있으면 제거하지 않는다.
|
||||||
|
- 선택 이유는 GLM이 모든 항목에서 최고라는 뜻이 아니다. **코드 정확성과 crop 속도**이며, Paddle의 전체 prose CER이 더 낮은 점도 유지한다. 드문 한글·공백 정확도는 여전히 미해결이다.
|
||||||
|
|
||||||
|
### 제품 구현·실제 검증
|
||||||
|
|
||||||
|
- `screen-ocr/ollama-precision-engine.ts`는 loopback만 허용하고, 명시적 정밀 읽기 요청 시에만 모델을 다운로드한다. 2분 keep-alive, 120초 생성 제한, 15분 다운로드 제한, 최대 4096 출력 토큰, 빈·잘린 응답 거부와 취소를 적용한다.
|
||||||
|
- `ScreenOcrService`는 선택 영역만 잘라 임시 PNG로 쓰고 완료 후 삭제한다. 원문은 바꾸지 않고 결과를 별도로 반환하며, 중복 요청과 비정상적으로 긴 반복 결과를 거부한다. 파일 생성 중 닫으면 모델을 호출하지 않는다.
|
||||||
|
- 새 단위·서비스 테스트 **51개**가 통과했다. 12개 로케일은 **2,547 keys × 12** 계약 GREEN, workspace typecheck·desktop lint·desktop production build·renderer 자산 검사(8 pages)·테스트 위생(453 files)도 통과했다.
|
||||||
|
- 빌드된 실제 오버레이를 루프백 정적 서버로 열어 단어 선택 → `refine-text` 요청 → 크롭 좌표 → 결과 표시 → 결과 복사를 통과했다. 연속 클릭은 한 번만 실행됐다. Electron 자체를 에이전트 subshell에서 실행하지는 않았다.
|
||||||
|
- 실제 소스 `ScreenOcrService` + 실제 GLM API를 연결한 라이브 호출은 **6.304초**, 임시 파일 0개였다. 코드의 **비공백 문자 1,215개와 특수문자 403개가 모두 일치**하고 핵심 토큰 누락이 없었다. 추가 빈 줄·탭 표현 등 **공백 3곳 차이**는 남아 있어 문자 그대로의 완전한 일치라고 기록하지 않는다.
|
||||||
|
- 새 정밀 읽기 버튼을 **실제 설치 앱에서 눌러 보는 GUI 검증과 다음 설치본 반영은 아직 하지 않았다.** 이전 `selectionText` 공백 수정과 이번 정밀 읽기 구현 모두 현재 작업 트리의 소스 변경이다. macOS 엔진과 드문 한글·공백 정확도는 `GAP-OCR-02`에 남긴다.
|
||||||
|
- 평가용 Paddle GGUF·PP-OCR venv·합성 표본·검증 스크립트와 두 PP-OCR 모델 캐시는 삭제했다. GLM-OCR은 실제 정밀 읽기에 사용할 모델로 남겼고, 임시 llama-server와 백그라운드 작업은 모두 종료했다. 이번 소스 변경의 커밋·푸시·설치본 배포는 하지 않았다.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
> Status: ACTIVE
|
> Status: ACTIVE
|
||||||
> Last full audit: 2026-09-13
|
> Last full audit: 2026-09-13
|
||||||
> Last update: 2026-11-20 — **데스크톱 `v1.18.4` 자동 업데이트 피드 복구.** 기존 설치본은 정상 확인했으나 공개 피드가 `1.17.1`에 멈춰 있었다. 미게시 1.18.x의 크기 초과·과거 release 재귀 포함·만료된 Forgejo token을 해결하고 `1.18.4`(`f77c86d`)를 게시했다. Windows full-only 설치본 `104,691,365 bytes`, 공개 signed manifest와 Release 다운로드 HTTP 206을 확인했다. 실제 설치 앱의 제안 화면은 사용자 수동 확인으로 남는다(`11` GAP-REL-17).
|
> Last update: 2026-11-21 — **데스크톱 `1.17.1 → 1.18.4` 실제 자동 업데이트 완료.** 제안 발견·다운로드·Ed25519 서명 검증·재시작 설치·기존 DB 열기를 설치 앱 로그로 확인했고, 실행 파일 ProductVersion `1.18.4.0`과 실제 화면 OCR 사용을 확인했다(`11` GAP-REL-17, INFRA-15 완료). 사용자가 보고한 OCR 기호·정확도 문제는 실제 Windows 엔진으로 재현했다. URL·이메일 토큰 사이의 부당한 공백은 소스에서 수정했고, GLM-OCR 선택 영역 정밀 읽기도 추가했다(51 focused tests·실제 서비스/API·빌드 UI 검증). 실제 설치 GUI 확인과 드문 한글·공백 정확도 개선은 `11` GAP-OCR-02에 남는다.
|
||||||
|
>
|
||||||
|
> Previous update: 2026-11-20 — **데스크톱 `v1.18.4` 자동 업데이트 피드 복구.** 기존 설치본은 정상 확인했으나 공개 피드가 `1.17.1`에 멈춰 있었다. 미게시 1.18.x의 크기 초과·과거 release 재귀 포함·만료된 Forgejo token을 해결하고 `1.18.4`(`f77c86d`)를 게시했다. Windows full-only 설치본 `104,691,365 bytes`, 공개 signed manifest와 Release 다운로드 HTTP 206을 확인했다.
|
||||||
>
|
>
|
||||||
> Previous update: 2026-11-14 — **전 표면 프로덕션 `v1.17.1` 배포 완결.** 데스크톱(`v1.17.1`, 커밋 `6c6875b`, 서명 매니페스트 `1.17.1/latest.yml`·`.sig` 및 `latest/latest.yml`, 런타임 `runtime-1.17.1`/`runtime-latest`, 포터블 `portable-1.17.1`/`portable-latest` 모두 Forgejo HTTP `200`, 태그 `v1.17.1` canonical/mirror 푸시; Human Release #339 ~91MB 바이너리 첨부만 Cloudflare HTTP 524/`ECONNRESET` `GAP-REL-16` 예외), Supabase 운영 DB(`db push --remote`, 전체 74개 마이그레이션 일치) 및 Edge Functions 24종(`--import-map deno.json --use-api`) 재배포, 랜딩 사이트(`site/` → Cloudflare Pages `d3ro`, `https://d3ro.chanpaca.net/release-identity.json` = `1.17.1`/`6c6875b` & `assetlinks.json` 검증 GREEN), Cloudflare Worker(`d3ro-voice-api` `--keep-vars`, Version ID `fe6d9532-0052-48f5-b62c-45c86f6aaaa5`), NAS Docker 스택(`d3ro_voice_api` `v1.17.1` `/health` `200`, `d3ro_voice_admin` `:3001`/`d3ro-admin.chanpaca.net/login` `200`, `d3ro_voice_web` `:3002/app/login`·`d3ro.chanpaca.net/app/login` `200`) 반영 완료.
|
> Previous update: 2026-11-14 — **전 표면 프로덕션 `v1.17.1` 배포 완결.** 데스크톱(`v1.17.1`, 커밋 `6c6875b`, 서명 매니페스트 `1.17.1/latest.yml`·`.sig` 및 `latest/latest.yml`, 런타임 `runtime-1.17.1`/`runtime-latest`, 포터블 `portable-1.17.1`/`portable-latest` 모두 Forgejo HTTP `200`, 태그 `v1.17.1` canonical/mirror 푸시; Human Release #339 ~91MB 바이너리 첨부만 Cloudflare HTTP 524/`ECONNRESET` `GAP-REL-16` 예외), Supabase 운영 DB(`db push --remote`, 전체 74개 마이그레이션 일치) 및 Edge Functions 24종(`--import-map deno.json --use-api`) 재배포, 랜딩 사이트(`site/` → Cloudflare Pages `d3ro`, `https://d3ro.chanpaca.net/release-identity.json` = `1.17.1`/`6c6875b` & `assetlinks.json` 검증 GREEN), Cloudflare Worker(`d3ro-voice-api` `--keep-vars`, Version ID `fe6d9532-0052-48f5-b62c-45c86f6aaaa5`), NAS Docker 스택(`d3ro_voice_api` `v1.17.1` `/health` `200`, `d3ro_voice_admin` `:3001`/`d3ro-admin.chanpaca.net/login` `200`, `d3ro_voice_web` `:3002/app/login`·`d3ro.chanpaca.net/app/login` `200`) 반영 완료.
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# 02 — Repository & Infrastructure Map
|
# 02 — Repository & Infrastructure Map
|
||||||
|
|
||||||
> Surface: whole repo
|
> Surface: whole repo
|
||||||
> Last updated: 2026-11-20 — `v1.18.4` 데스크톱 업데이트 피드 복구: Electron 43 패키지의 100 MiB 업로드 한도 초과를 패키지 중복·미사용 플랫폼 바이너리 제거와 Windows full-only 최대 압축으로 해소하고 실제 설치본·서명 매니페스트를 검증
|
> Last updated: 2026-11-21 — 화면 OCR에 선택 영역 전용 GLM-OCR 정밀 읽기 추가: 설치본에는 모델을 포함하지 않고 명시적 첫 요청 시 다운로드하며, loopback 전용 이미지 처리·2분 상주·출력/시간 제한을 적용. `v1.18.4` full-only 패키지·피드 계약은 변경하지 않음
|
||||||
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
|
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -267,6 +267,7 @@ Version sync is enforced by `scripts/ci/sync-version.mjs` and `verify-release-me
|
||||||
- `resources/ffmpeg/` — optional bundled ffmpeg (CI or manual); `getFfmpegPath()` also resolves the `@ffmpeg-installer/ffmpeg` binary from `app.asar.unpacked`.
|
- `resources/ffmpeg/` — optional bundled ffmpeg (CI or manual); `getFfmpegPath()` also resolves the `@ffmpeg-installer/ffmpeg` binary from `app.asar.unpacked`.
|
||||||
- `apps/desktop/sidecar-dist/` — PyInstaller sidecar bundle consumed by `extraResources` (gitignored; built by `npm --prefix apps/desktop run sidecar:build`).
|
- `apps/desktop/sidecar-dist/` — PyInstaller sidecar bundle consumed by `extraResources` (gitignored; built by `npm --prefix apps/desktop run sidecar:build`).
|
||||||
- `resources/icons/` — empty; electron-builder falls back to `build/icon.ico|png`.
|
- `resources/icons/` — empty; electron-builder falls back to `build/icon.ico|png`.
|
||||||
|
- GLM-OCR precise screen reading (`apps/desktop/src/main/services/screen-ocr/ollama-precision-engine.ts`) uses the existing Ollama server and downloads `glm-ocr:latest` (about 2.7 GB) only on the user's first explicit precise-reading request. The model is **not bundled in the installer**. Only a selected crop is sent to a loopback server, remote Ollama URLs are rejected, the model stays loaded for 2 minutes, and output length/timeouts are bounded. No Paddle/PyTorch runtime was added to the product.
|
||||||
- Desktop tests: `apps/desktop/tests/` — `unit/`, `main/`, `red/`, `shared/`, `integration/`, `eval/` run under Vitest; `e2e/` holds Playwright specs plus the shared `e2e/support/electron-app.ts` fixture (per-test temp user-data dir). Artifacts in `apps/desktop/test-results/`.
|
- Desktop tests: `apps/desktop/tests/` — `unit/`, `main/`, `red/`, `shared/`, `integration/`, `eval/` run under Vitest; `e2e/` holds Playwright specs plus the shared `e2e/support/electron-app.ts` fixture (per-test temp user-data dir). Artifacts in `apps/desktop/test-results/`.
|
||||||
- Test taxonomy + hygiene gate: `docs/tdd-red/06-repo-application.md`. `npm run test:hygiene` (+ `:test`) rejects `.only`, reason-less `.skip()`, trivial assertions, `isVisible()`-gated assertions, machine-specific paths, `waitForTimeout`, and `.e2e.test.ts` names; wired into CI `quality`.
|
- Test taxonomy + hygiene gate: `docs/tdd-red/06-repo-application.md`. `npm run test:hygiene` (+ `:test`) rejects `.only`, reason-less `.skip()`, trivial assertions, `isVisible()`-gated assertions, machine-specific paths, `waitForTimeout`, and `.e2e.test.ts` names; wired into CI `quality`.
|
||||||
- Test-system gates (TDD 2.0 Phases 0–5, 2026-11-08..13):
|
- Test-system gates (TDD 2.0 Phases 0–5, 2026-11-08..13):
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ Singleton + `EventEmitter` pattern (`getXService()` accessors).
|
||||||
| `VoiceCommandService` | Keyword → command rule matching |
|
| `VoiceCommandService` | Keyword → command rule matching |
|
||||||
| `ChainService` | Multi-step LLM pipelines (LLMChain). Each step resolves its instruction through `llm-prompts.ts` (`ChainService.ts:196`); before that, chain steps sent placeholders through unsubstituted |
|
| `ChainService` | Multi-step LLM pipelines (LLMChain). Each step resolves its instruction through `llm-prompts.ts` (`ChainService.ts:196`); before that, chain steps sent placeholders through unsubstituted |
|
||||||
| `ScreenContextService` | Active-window + selected-text context (on Windows uses `sendWin32CopyChord()` via `koffi` `SendInput` without loading `nut-js`) |
|
| `ScreenContextService` | Active-window + selected-text context (on Windows uses `sendWin32CopyChord()` via `koffi` `SendInput` without loading `nut-js`) |
|
||||||
| `ScreenOcrService` | Screen text capture (CAP-17): owns one capture session — capture → overlay → async recognition → overlay requests (copy text/image, save PNG/searchable PDF, translate, summarize, read aloud, open link/search, language switch) → close. All OS access is behind ports (`services/screen-ocr/electron-adapters.ts`); engine port `OcrEnginePort` has one adapter, `windows-ocr-engine.ts` (Windows.Media.Ocr). Assembled in `src/main/screen-ocr-wiring.ts` (key binding, overlay IPC with sender check, `Escape` capture while open except during a save dialog). Events: `opened`, `closed`. |
|
| `ScreenOcrService` | Screen text capture (CAP-17): owns one capture session — capture → overlay → async recognition → overlay requests (copy text/image, save PNG/searchable PDF, **local GLM-OCR precise reading**, translate, summarize, read aloud, open link/search, language switch) → close. All OS access is behind ports (`services/screen-ocr/electron-adapters.ts`); base engine port `OcrEnginePort` has one adapter, `windows-ocr-engine.ts` (Windows.Media.Ocr). `selectionText` uses word boxes to join tightly spaced URL/email/punctuation tokens without collapsing ordinary word spacing; it never guesses replacement glyphs. The separate `PrecisionOcrEnginePort` (`screen-ocr/ollama-precision-engine.ts`) sends only a selected crop to native `/api/generate` on a **loopback** Ollama server (remote URLs rejected), downloads `glm-ocr:latest` only after the explicit precise action, keeps it for 2m, bounds output tokens, rejects empty/truncated output, and preserves the original on failure. `precision-output.ts` removes only a single generated outer code fence when neither the body nor source contains fences. Assembled in `src/main/screen-ocr-wiring.ts` (key binding, overlay IPC with sender check, `Escape` capture while open except during a save dialog). Events: `opened`, `closed`. |
|
||||||
|
|
||||||
### Phase 10+ features
|
### Phase 10+ features
|
||||||
| Service | Purpose |
|
| Service | Purpose |
|
||||||
|
|
@ -105,7 +105,7 @@ The existing `input-telemetry-handlers` and `suggestion-handlers` IPC extensions
|
||||||
| `CloudSyncService` | Supabase auth + lifecycle: per-user DB switching, local-mode import on first sign-in, Realtime (`ws` transport) + 5-min heartbeat, device check-in, debounced flush/pull triggers. The sync itself lives in `services/sync/` |
|
| `CloudSyncService` | Supabase auth + lifecycle: per-user DB switching, local-mode import on first sign-in, Realtime (`ws` transport) + 5-min heartbeat, device check-in, debounced flush/pull triggers. The sync itself lives in `services/sync/` |
|
||||||
| `services/sync/` | `SyncEngine` (backfill once per user DB → push outbox → pull by server-clock keyset cursor → tombstones → memo-tag reconcile), `sync-outbox` (`sync_outbox`/`sync_state` tables), `sync-adapters` (history, dictionary, meetings, meeting memos/documents, custom commands, templates), `memo-tag-sync`, `supabase-sync-remote`, `device-registration`, `realtime-transport`, `settings-sync` (mobile `user_settings` ↔ language/theme/defaultLLMAction/activeInstructionId), `audio-sync` (recording upload to the `audio` bucket, remote cleanup on delete), knowledge adapter (source-text chunks), `transcript-sync` (meeting segments from the desktop transcript), `builtin-instruction-sync` (preset prompt edits ↔ server preset rows). Services record changes with `getCloudSyncService().pushOne/pushDelete(entity, id)`; pulled rows are applied without re-queuing |
|
| `services/sync/` | `SyncEngine` (backfill once per user DB → push outbox → pull by server-clock keyset cursor → tombstones → memo-tag reconcile), `sync-outbox` (`sync_outbox`/`sync_state` tables), `sync-adapters` (history, dictionary, meetings, meeting memos/documents, custom commands, templates), `memo-tag-sync`, `supabase-sync-remote`, `device-registration`, `realtime-transport`, `settings-sync` (mobile `user_settings` ↔ language/theme/defaultLLMAction/activeInstructionId), `audio-sync` (recording upload to the `audio` bucket, remote cleanup on delete), knowledge adapter (source-text chunks), `transcript-sync` (meeting segments from the desktop transcript), `builtin-instruction-sync` (preset prompt edits ↔ server preset rows). Services record changes with `getCloudSyncService().pushOne/pushDelete(entity, id)`; pulled rows are applied without re-queuing |
|
||||||
| `CloudSTTService` | Thin cloud STT wrapper over `D3ROCloudDriver` |
|
| `CloudSTTService` | Thin cloud STT wrapper over `D3ROCloudDriver` |
|
||||||
| `UpdateService` | electron-updater (canonical Forgejo feed, channels, mandatory/full-vs-delta policy, staged rollout). Native consent/restart dialogs resolve `update.dialog.*` through a fresh `getPopupTranslator()` at each prompt, so a runtime locale change is reflected without rebuilding the prompter; unit tests cover required/optional paths and a ko→en switch on the same prompter. `update-dialog-preview.ts` exposes only the explicit `--preview-update-dialogs` manual-QA entry described above. The current-source package was built and its native ABI verified; packaged dialog appearance/interaction remains unverified until that executable is run on the interactive desktop. |
|
| `UpdateService` | electron-updater (canonical Forgejo feed, channels, mandatory/full-vs-delta policy, staged rollout). Native consent/restart dialogs resolve `update.dialog.*` through a fresh `getPopupTranslator()` at each prompt, so a runtime locale change is reflected without rebuilding the prompter; unit tests cover required/optional paths and a ko→en switch on the same prompter. `update-dialog-preview.ts` exposes only the explicit `--preview-update-dialogs` manual-QA entry described above. The installed 1.17.1 app found, downloaded, signature-verified and installed 1.18.4 on 2026-11-21, then opened its existing DB and ran the real OCR overlay. The optional consent/restart journey is verified; the four explicit preview-dialog variants are not an exhaustive visual test. |
|
||||||
| `AutoLaunchService` | OS login-item auto-start |
|
| `AutoLaunchService` | OS login-item auto-start |
|
||||||
| `LoggerService` | electron-log wrapper + category loggers |
|
| `LoggerService` | electron-log wrapper + category loggers |
|
||||||
| upgrade / billing | No in-app checkout. `license-handlers.ts` `LICENSE.OPEN_BILLING` opens `billingUrl({ tier })` (web Payple); tier returns via `license:tierChanged`. Stripe `payment-handlers.ts`·`CheckoutModal`·`payment:*` IPC removed 2026-09-26 |
|
| upgrade / billing | No in-app checkout. `license-handlers.ts` `LICENSE.OPEN_BILLING` opens `billingUrl({ tier })` (web Payple); tier returns via `license:tierChanged`. Stripe `payment-handlers.ts`·`CheckoutModal`·`payment:*` IPC removed 2026-09-26 |
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Status quick-reference: `[x]` done+verified · `[~]` partial/unverified · `[ ]`
|
||||||
| CAP-14 | Recording persistence / crash recovery | [x] | [ ] | [x] | [-] | Desktop WAV persist; mobile durable queue + process-kill WAV recovery |
|
| CAP-14 | Recording persistence / crash recovery | [x] | [ ] | [x] | [-] | Desktop WAV persist; mobile durable queue + process-kill WAV recovery |
|
||||||
| CAP-15 | Android foreground recording service | [-] | [-] | [x] | [-] | Mobile API 34 FGS + persistent notification (SSOT R-005 GREEN) |
|
| CAP-15 | Android foreground recording service | [-] | [-] | [x] | [-] | Mobile API 34 FGS + persistent notification (SSOT R-005 GREEN) |
|
||||||
| CAP-16 | Rebindable global key bindings (keyboard + mouse) | [x] | [-] | [-] | [-] | Contract SSOT `packages/core/src/keybinding.ts`: `KEY_CATALOG` (10 groups), `KEYBINDING_ACTIONS` (6 actions), `validateBinding`, `detectBindingConflicts`. Multiple bindings per action persist as one `AppConfig.keyBindings` map (`packages/core/src/types.ts`), replacing the four singular `*Shortcut` fields; `ConfigService` migrates legacy values once. `KeyBindingService` hooks keyboard **and** mouse via uiohook — MB1 is not bindable, MB2/MB3 need a modifier, MB4/MB5 are free. **Verified 2026-09-21 on Windows by a manual run** and **2026-10-30 unit-tested** in `KeyBindingService.test.ts` (11 tests, GAP-KEY-01 `[x]`), with dedicated `command` action toggle/hold + forced voice-command matching in `VoiceModeService.ts` / `voice-intent.ts` (`voice-intent.test.ts` 19 tests, GAP-KEY-03 `[x]`). **Still open:** macOS/Linux mouse behavior (`11` GAP-KEY-02). W/M `[-]`: no OS-level global binding surface exists there. B `[-]`: device-local setting. |
|
| CAP-16 | Rebindable global key bindings (keyboard + mouse) | [x] | [-] | [-] | [-] | Contract SSOT `packages/core/src/keybinding.ts`: `KEY_CATALOG` (10 groups), `KEYBINDING_ACTIONS` (6 actions), `validateBinding`, `detectBindingConflicts`. Multiple bindings per action persist as one `AppConfig.keyBindings` map (`packages/core/src/types.ts`), replacing the four singular `*Shortcut` fields; `ConfigService` migrates legacy values once. `KeyBindingService` hooks keyboard **and** mouse via uiohook — MB1 is not bindable, MB2/MB3 need a modifier, MB4/MB5 are free. **Verified 2026-09-21 on Windows by a manual run** and **2026-10-30 unit-tested** in `KeyBindingService.test.ts` (11 tests, GAP-KEY-01 `[x]`), with dedicated `command` action toggle/hold + forced voice-command matching in `VoiceModeService.ts` / `voice-intent.ts` (`voice-intent.test.ts` 19 tests, GAP-KEY-03 `[x]`). **Still open:** macOS/Linux mouse behavior (`11` GAP-KEY-02). W/M `[-]`: no OS-level global binding surface exists there. B `[-]`: device-local setting. |
|
||||||
| CAP-17 | Screen text capture (OCR overlay) | [~] | [-] | [-] | [-] | Desktop/Windows. The rebindable `screen-ocr` action (default `Ctrl+Alt+O`, CAP-16) freezes the monitor under the cursor and covers it with the `screen-ocr` popup; text is selected by flow drag (start on a word), rectangle drag (start on empty space or in Area mode), double-click word, triple-click line, Shift+click extend, `Ctrl+A`. Actions: copy (multi-line / one line), copy image, save PNG, **searchable PDF** (image above a real text layer), translate and summarize through `LlmGateway`, read aloud (`TTSPlaybackService`), open link / web search, recognition language switch (`AppConfig.screenOcrLanguage`). Pure selection/text/PDF logic `packages/core/src/screen-ocr.ts`; service `apps/desktop/src/main/services/ScreenOcrService.ts`; engine `services/screen-ocr/windows-ocr-engine.ts` (Windows.Media.Ocr via `powershell.exe -EncodedCommand`, 2x upscale); capture `utils/win32-screen-capture.ts` (GDI BitBlt, 39 ms vs 2.9 s for `desktopCapturer` on a 3-monitor PC). The capture touches disk only as one temp PNG that is deleted right after recognition. **Verified 2026-11-20:** core 34 + desktop 41 tests, real-engine probe (Korean+English screen, 0.64 s), headless overlay run (flow/rect selection, copy, translate, PDF request, release on close) and a printed PDF whose text layer is searchable. **Not yet verified:** the live hotkey journey in the running app (focus, mixed-DPI multi-monitor) — `GAP-OCR-01`. macOS has no engine and fails closed with a message — `GAP-OCR-02`. |
|
| CAP-17 | Screen text capture (OCR overlay) | [~] | [-] | [-] | [-] | Desktop/Windows. The rebindable `screen-ocr` action (default `Ctrl+Alt+O`, CAP-16) freezes the monitor under the cursor and covers it with the `screen-ocr` popup; text is selected by flow drag (start on a word), rectangle drag (start on empty space or in Area mode), double-click word, triple-click line, Shift+click extend, `Ctrl+A`. Actions: copy (multi-line / one line), copy image, save PNG, **searchable PDF** (image above a real text layer), translate and summarize through `LlmGateway`, read aloud (`TTSPlaybackService`), open link / web search, recognition language switch (`AppConfig.screenOcrLanguage`). Pure selection/text/PDF logic `packages/core/src/screen-ocr.ts`; service `apps/desktop/src/main/services/ScreenOcrService.ts`; engine `services/screen-ocr/windows-ocr-engine.ts` (Windows.Media.Ocr via `powershell.exe -EncodedCommand`, 2x upscale); capture `utils/win32-screen-capture.ts` (GDI BitBlt, 39 ms vs 2.9 s for `desktopCapturer` on a 3-monitor PC). The capture touches disk only as one temp PNG that is deleted right after recognition. **Verified 2026-11-20:** core 34 + desktop 39 tests, real-engine probe (Korean+English screen, 0.64 s), headless overlay run (flow/rect selection, copy, translate, PDF request, release on close) and a printed PDF whose text layer is searchable. **2026-11-21:** installed 1.18.4 ran the real OCR overlay. Pixel-aware joining has 37 core tests (full core 666); GLM precise mode has 51 focused tests. A local GLM-OCR precise action now reads only the selected crop, downloads the model on explicit request, keeps the original on failure, and rejects remote Ollama URLs and truncated/repeated output. Real model comparison: Windows 32.29% overall CER, PP-OCRv5 14.35%, PaddleOCR-VL crop 2.99%, GLM crop 5.08% (GLM has rare Korean/format errors but exact code content apart from generated fences and was 3.74s vs Paddle 20.89s mean). The real service preserved all 1,215 non-whitespace characters and 403 symbols in the code fixture, with three whitespace-only differences and no temp files left. Built-overlay selection→crop→result→copy passes. **Not yet verified:** installed-app precise button, mixed-DPI multi-monitor focus/copy/PDF, rare Korean/whitespace parity — `GAP-OCR-01` and `GAP-OCR-02`. macOS has no engine and fails closed with a message — `GAP-OCR-02`. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -234,7 +234,7 @@ end-to-end behaviour has **not been verified by typing in a real app** (`11` GAP
|
||||||
| INFRA-12 | Cloudflare edge + tunnel | [x] | `server/cloudflare-worker`, Cloudflare Tunnel `kd-nas` |
|
| INFRA-12 | Cloudflare edge + tunnel | [x] | `server/cloudflare-worker`, Cloudflare Tunnel `kd-nas` |
|
||||||
| INFRA-13 | Site deploy (Cloudflare Pages) | [x] | `.forgejo/workflows/deploy-site.yml`; the unused GitHub Pages workflow was removed in Wave 3 |
|
| INFRA-13 | Site deploy (Cloudflare Pages) | [x] | `.forgejo/workflows/deploy-site.yml`; the unused GitHub Pages workflow was removed in Wave 3 |
|
||||||
| INFRA-17 | Test hygiene & TDD v2.0 gates | [x] | `scripts/ci/check-test-hygiene.mjs` (`test:hygiene`), `check-protected-tests.mjs` (`check:protected-tests`), `check-test-quality.mjs` (`test:quality`), `check-i18n-contract.mjs` (`check:i18n`), `check-ds-contract.mjs` (`check:ds-contract`), `run-affected-tests.mjs` (`test:affected`), `verify-desktop-installer-smoke.mjs` (`release:installer:smoke`), and `@d3ro/core/ports` (`Clock`/`Random` deterministic ports) — all equipped with `--self-test` and wired into `verify:all`, `.forgejo/workflows/ci.yml`, `release-desktop.mjs`, and `.forgejo/workflows/release.yml`. Applied policy: `docs/tdd-red/06-repo-application.md`, `07-revamp-plan.md`. |
|
| INFRA-17 | Test hygiene & TDD v2.0 gates | [x] | `scripts/ci/check-test-hygiene.mjs` (`test:hygiene`), `check-protected-tests.mjs` (`check:protected-tests`), `check-test-quality.mjs` (`test:quality`), `check-i18n-contract.mjs` (`check:i18n`), `check-ds-contract.mjs` (`check:ds-contract`), `run-affected-tests.mjs` (`test:affected`), `verify-desktop-installer-smoke.mjs` (`release:installer:smoke`), and `@d3ro/core/ports` (`Clock`/`Random` deterministic ports) — all equipped with `--self-test` and wired into `verify:all`, `.forgejo/workflows/ci.yml`, `release-desktop.mjs`, and `.forgejo/workflows/release.yml`. Applied policy: `docs/tdd-red/06-repo-application.md`, `07-revamp-plan.md`. |
|
||||||
| INFRA-15 | Update & release system | [~] | Canonical Forgejo feed + channels/policy, publisher `scripts/ci/publish-forgejo-release.mjs`; `npm run release:metadata:test`. 2026-11-20 `1.18.4`(`f77c86d`) Windows full-only 설치본 `104,691,365 bytes`를 게시하고 공개 피드·signed manifest·Release HTTP 206을 확인했다. 과거 release 재귀 포함과 source map·미사용 플랫폼 binary를 차단한다. 실제 1.17.1 설치본의 업데이트 제안·설치 GUI는 `11` GAP-REL-17의 남은 게이트다. |
|
| INFRA-15 | Update & release system | [x] | Canonical Forgejo feed + channels/policy, publisher `scripts/ci/publish-forgejo-release.mjs`; `npm run release:metadata:test`. `1.18.4`(`f77c86d`) Windows full-only 설치본 `104,691,365 bytes`를 게시했다. 2026-11-21 실제 1.17.1 설치본에서 제안 발견·다운로드·서명 검증·재시작 설치·기존 DB 열기를 확인했고 ProductVersion `1.18.4.0`과 실제 화면 OCR 사용을 검증했다. 과거 release 재귀 포함과 source map·미사용 플랫폼 binary를 차단한다. |
|
||||||
| INFRA-16 | Desktop STT engine packaging | [x] | `apps/desktop/scripts/setup-sidecar.mjs` + `build-sidecar.mjs`, `electron-builder.yml` `extraResources` (`sidecar-dist/sidecar` → `resources/sidecar`, `resources/ffmpeg`), and `scripts/ci/verify-sidecar-bundle.mjs` run in `package-windows`/`package-macos` before electron-builder. Verified on the real bundle: `sidecar.exe` + `_internal` including `faster_whisper/assets/silero_vad_v6.onnx`, plus a packaged-engine transcription round-trip on GPU. |
|
| INFRA-16 | Desktop STT engine packaging | [x] | `apps/desktop/scripts/setup-sidecar.mjs` + `build-sidecar.mjs`, `electron-builder.yml` `extraResources` (`sidecar-dist/sidecar` → `resources/sidecar`, `resources/ffmpeg`), and `scripts/ci/verify-sidecar-bundle.mjs` run in `package-windows`/`package-macos` before electron-builder. Verified on the real bundle: `sidecar.exe` + `_internal` including `faster_whisper/assets/silero_vad_v6.onnx`, plus a packaged-engine transcription round-trip on GPU. |
|
||||||
| INFRA-17 | 서명 없는 배포 채널 (portable + Scoop) | [x] | `scripts/ci/build-portable.mjs` (95MiB 7z 분할 볼륨 + Scoop 매니페스트), `scripts/ci/publish-portable-release.mjs`, `scripts/local/install-d3ro-voice.ps1`, `bucket/` 버킷, `.forgejo/workflows/portable.yml`; 7z 분할 볼륨(Scoop, 162MiB) + zip 분할 부품(수동 설치, 243MiB, 7-Zip 불필요); updater feed와 분리. 2026-09-18 `portable-1.3.1` 게시 + 실제 설치 검증. |
|
| INFRA-17 | 서명 없는 배포 채널 (portable + Scoop) | [x] | `scripts/ci/build-portable.mjs` (95MiB 7z 분할 볼륨 + Scoop 매니페스트), `scripts/ci/publish-portable-release.mjs`, `scripts/local/install-d3ro-voice.ps1`, `bucket/` 버킷, `.forgejo/workflows/portable.yml`; 7z 분할 볼륨(Scoop, 162MiB) + zip 분할 부품(수동 설치, 243MiB, 7-Zip 불필요); updater feed와 분리. 2026-09-18 `portable-1.3.1` 게시 + 실제 설치 검증. |
|
||||||
| INFRA-18 | 로컬 런타임 온디맨드 설치 | [x] | `RuntimeProvisioner`(부품 다운로드 + SHA-256 검증 + tar 해제, `%APPDATA%/d3ro-voice/runtime`), `POST runtime:ensure` / `runtime:progress` IPC, 설정 > STT 상태/내려받기 UI. 설치본에서 엔진/ffmpeg를 분리해 189MB → 90.6MiB, 업데이트 피드 게시 복구. 검증은 전부 디스크에 기록된 파일 기준이며(부품 크기·해시 → 결합본 크기·해시), 부품 다운로드는 최대 3회 재시도한다. 2026-09-18 실제 feed 통합 검증(엔진 94.4MiB/18초, ffmpeg 21.7MiB/5초). |
|
| INFRA-18 | 로컬 런타임 온디맨드 설치 | [x] | `RuntimeProvisioner`(부품 다운로드 + SHA-256 검증 + tar 해제, `%APPDATA%/d3ro-voice/runtime`), `POST runtime:ensure` / `runtime:progress` IPC, 설정 > STT 상태/내려받기 UI. 설치본에서 엔진/ffmpeg를 분리해 189MB → 90.6MiB, 업데이트 피드 게시 복구. 검증은 전부 디스크에 기록된 파일 기준이며(부품 크기·해시 → 결합본 크기·해시), 부품 다운로드는 최대 3회 재시도한다. 2026-09-18 실제 feed 통합 검증(엔진 94.4MiB/18초, ffmpeg 21.7MiB/5초). |
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res
|
||||||
| ID | Area | Gap | Evidence | Suggested next step |
|
| ID | Area | Gap | Evidence | Suggested next step |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| GAP-OCR-01 | Desktop | Screen text capture (CAP-17) has not been driven end-to-end in the running app: global hotkey → overlay takes focus → drag select → copy/PDF on a real desktop, including a mixed-DPI multi-monitor setup. Unit, real-engine and headless-overlay checks pass. | `apps/desktop/src/main/screen-ocr-wiring.ts`, `apps/desktop/src/main/windows/screen-ocr-overlay.ts`, `apps/desktop/tests/main/services/screen-ocr-service.test.ts` | Run the installed build: press `Ctrl+Alt+O` on each monitor, confirm the frozen image lines up with the real screen, Esc/Ctrl+C work without a first click, and a saved PDF is searchable. Then flip CAP-17 to `[x]`. |
|
| GAP-OCR-01 | Desktop | Screen text capture (CAP-17) has not been driven end-to-end in the running app: global hotkey → overlay takes focus → drag select → copy/PDF on a real desktop, including a mixed-DPI multi-monitor setup. Unit, real-engine and headless-overlay checks pass. | `apps/desktop/src/main/screen-ocr-wiring.ts`, `apps/desktop/src/main/windows/screen-ocr-overlay.ts`, `apps/desktop/tests/main/services/screen-ocr-service.test.ts` | Run the installed build: press `Ctrl+Alt+O` on each monitor, confirm the frozen image lines up with the real screen, Esc/Ctrl+C work without a first click, and a saved PDF is searchable. Then flip CAP-17 to `[x]`. |
|
||||||
| GAP-OCR-02 | Desktop | Screen text capture is Windows-only and uses a single recognizer language per pass. macOS has no engine (fails closed with a message); with only the Korean Windows OCR pack installed, small English UI text is sometimes misread. | `apps/desktop/src/main/services/screen-ocr/windows-ocr-engine.ts` (`OcrEnginePort`) | Add a macOS Vision adapter behind `OcrEnginePort`; consider a second pass with another installed language for mixed-language screens, or a bundled ONNX recognizer downloaded at runtime. |
|
| GAP-OCR-02 | Desktop | The default screen OCR remains Windows-only; macOS has no engine (fails closed). Korean Windows OCR misread symbols and English/code, while generative alternatives can still alter rare Hangul, punctuation and whitespace. The installed-app precise-reading journey and mixed real-screen evaluation are not verified. | `apps/desktop/src/main/services/screen-ocr/{windows-ocr-engine,ollama-precision-engine,precision-output}.ts`, `apps/desktop/src/main/services/ScreenOcrService.ts`, `packages/core/src/screen-ocr.ts` | `[~]` 2026-11-21: GLM-OCR precise reading is implemented for selected crops with loopback-only privacy, explicit model download, bounded output, original-text fallback and 51 focused tests. Official model/GGUF comparisons included Windows, PP-OCRv5 and PaddleOCR-VL 1.6; GLM was selected for code fidelity and crop latency, not the best overall prose CER. The real service preserved all 1,215 non-whitespace characters and 403 symbols in a code fixture but had three whitespace differences. **Next:** verify the precise button in an installed build and test held-out real screens; add macOS Vision and evaluate rare Hangul/whitespace separately. Do not claim universal exact OCR or ship Paddle/PyTorch dependencies based on synthetic scores alone. |
|
||||||
| GAP-QA-01 | Quality | Extreme Red Team: headful end-to-end bug hunting across real desktop Electron, Web Next.js, and CI pipelines. | `red_team_log.md`, `apps/desktop/tests/e2e`, `apps/web/e2e/smoke.spec.ts` | `[x]` 2026-09-15: 18 scenarios executed, 14 defects caught and 100% resolved (infinite chunking loop DEF-008, IPC signature mismatch DEF-004, markdown editor typing rollback DEF-006, Web RSC Link serialization DEF-012, secret scanner lookahead DEF-013, etc.). All 18 scenarios GREEN with zero regressions. **2026-11-04 rework:** the red-team cycle specs were one-off bug hunts (machine screenshot paths, fixed sleeps, conditional assertions) and were replaced by 5 behavior-scoped protected journeys + a shared Electron fixture; 4 stale/duplicate feature specs, the orphaned root `tests/e2e`, and 7 ad-hoc Playwright runner scripts were deleted. Duplicates merged. New `npm run test:hygiene` gate blocks the patterns that made them meaningless. Log: `docs/tdd-red/06-repo-application.md`. |
|
| GAP-QA-01 | Quality | Extreme Red Team: headful end-to-end bug hunting across real desktop Electron, Web Next.js, and CI pipelines. | `red_team_log.md`, `apps/desktop/tests/e2e`, `apps/web/e2e/smoke.spec.ts` | `[x]` 2026-09-15: 18 scenarios executed, 14 defects caught and 100% resolved (infinite chunking loop DEF-008, IPC signature mismatch DEF-004, markdown editor typing rollback DEF-006, Web RSC Link serialization DEF-012, secret scanner lookahead DEF-013, etc.). All 18 scenarios GREEN with zero regressions. **2026-11-04 rework:** the red-team cycle specs were one-off bug hunts (machine screenshot paths, fixed sleeps, conditional assertions) and were replaced by 5 behavior-scoped protected journeys + a shared Electron fixture; 4 stale/duplicate feature specs, the orphaned root `tests/e2e`, and 7 ad-hoc Playwright runner scripts were deleted. Duplicates merged. New `npm run test:hygiene` gate blocks the patterns that made them meaningless. Log: `docs/tdd-red/06-repo-application.md`. |
|
||||||
| GAP-REL-01 | Release | Official release publication to Forgejo and active public download center deployment. | `scripts/ci/publish-forgejo-release.mjs`, `apps/web/src/app/download/page.tsx`, `site/src/sections/Download.tsx`, `apps/web/e2e/smoke.spec.ts` | `[~]` 2026-09-15: v1.1.0 release assets (`D3RO-Voice-Setup-1.1.0-x64.exe`, `.blockmap`, `latest.yml`, `update-policy.json`) published to canonical Forgejo registry and release hub. 2026-09-16: the published 1.1.0 installer carries no Authenticode signature, so it does not satisfy the release policy; product version moved to `1.2.0` and publication must come from CI with the signing gate GREEN. Download centers in `apps/web` (`/download`) and `site` (`#download`) link the canonical Forgejo feed. 2026-09-19: `1.3.7` (overlay fix) is published to the canonical updater feed (`latest.yml` = 1.3.7, 90.6MiB); the CI signing gate that blocks tag-driven publication is still unresolved, so this went out through the local updater path (GAP-REL-06). 2026-09-23: `1.5.0` published the same way (updater feed `latest.yml` = 1.5.0, installer 91.2MiB / 95,612,108 bytes, sha512 matches the local build and the feed serves it anonymously); the runtime and portable channels were republished first. **2026-11-14 (`v1.17.1`):** Desktop `1.17.1` (`6c6875b`, `D3RO-Voice-Setup-1.17.1-x64.exe` `95,294,301` bytes + Ed25519 signed `latest.yml`/`.sig`), `runtime-1.17.1`/`runtime-latest`, `portable-1.17.1`/`portable-latest`, 및 Landing `site/` (`https://d3ro.chanpaca.net/release-identity.json` = `1.17.1`/`6c6875b`)가 프로덕션에 게시됐다(단 Authenticode SmartScreen 평판 `GAP-REL-02`/`06` 및 Release #339 ~91MB 첨부 `GAP-REL-16` 예외는 유지). |
|
| GAP-REL-01 | Release | Official release publication to Forgejo and active public download center deployment. | `scripts/ci/publish-forgejo-release.mjs`, `apps/web/src/app/download/page.tsx`, `site/src/sections/Download.tsx`, `apps/web/e2e/smoke.spec.ts` | `[~]` 2026-09-15: v1.1.0 release assets (`D3RO-Voice-Setup-1.1.0-x64.exe`, `.blockmap`, `latest.yml`, `update-policy.json`) published to canonical Forgejo registry and release hub. 2026-09-16: the published 1.1.0 installer carries no Authenticode signature, so it does not satisfy the release policy; product version moved to `1.2.0` and publication must come from CI with the signing gate GREEN. Download centers in `apps/web` (`/download`) and `site` (`#download`) link the canonical Forgejo feed. 2026-09-19: `1.3.7` (overlay fix) is published to the canonical updater feed (`latest.yml` = 1.3.7, 90.6MiB); the CI signing gate that blocks tag-driven publication is still unresolved, so this went out through the local updater path (GAP-REL-06). 2026-09-23: `1.5.0` published the same way (updater feed `latest.yml` = 1.5.0, installer 91.2MiB / 95,612,108 bytes, sha512 matches the local build and the feed serves it anonymously); the runtime and portable channels were republished first. **2026-11-14 (`v1.17.1`):** Desktop `1.17.1` (`6c6875b`, `D3RO-Voice-Setup-1.17.1-x64.exe` `95,294,301` bytes + Ed25519 signed `latest.yml`/`.sig`), `runtime-1.17.1`/`runtime-latest`, `portable-1.17.1`/`portable-latest`, 및 Landing `site/` (`https://d3ro.chanpaca.net/release-identity.json` = `1.17.1`/`6c6875b`)가 프로덕션에 게시됐다(단 Authenticode SmartScreen 평판 `GAP-REL-02`/`06` 및 Release #339 ~91MB 첨부 `GAP-REL-16` 예외는 유지). |
|
||||||
| GAP-REL-08 | Release | 다운로드 센터가 **존재하지 않는 설치 파일**을 가리켰다. `apps/web/src/lib/desktop-release.ts`와 `site/src/release.ts`의 `DESKTOP_VERSION`이 `1.2.0`에 멈춰 있어 설치 URL이 `D3RO-Voice-Setup-1.2.0-x64.exe`였고, 그 경로는 피드에서 404다(실측: 1.2.0=404, 1.3.7=206). `version:sync`가 이 두 표면을 덮지 않아 계속 어긋났다. | `scripts/ci/sync-version.mjs`, `apps/web/src/lib/desktop-release.ts`, `site/src/release.ts` | `[x]` 2026-09-19: 두 다운로드 계약 파일을 `sync-version.mjs` 대상에 추가해 버전·릴리스일이 SSOT에서 자동 반영되도록 하고, 현재 값(1.3.7 / 2026-09-19)으로 정정했다. `version:check`·typecheck·site 빌드 GREEN. |
|
| GAP-REL-08 | Release | 다운로드 센터가 **존재하지 않는 설치 파일**을 가리켰다. `apps/web/src/lib/desktop-release.ts`와 `site/src/release.ts`의 `DESKTOP_VERSION`이 `1.2.0`에 멈춰 있어 설치 URL이 `D3RO-Voice-Setup-1.2.0-x64.exe`였고, 그 경로는 피드에서 404다(실측: 1.2.0=404, 1.3.7=206). `version:sync`가 이 두 표면을 덮지 않아 계속 어긋났다. | `scripts/ci/sync-version.mjs`, `apps/web/src/lib/desktop-release.ts`, `site/src/release.ts` | `[x]` 2026-09-19: 두 다운로드 계약 파일을 `sync-version.mjs` 대상에 추가해 버전·릴리스일이 SSOT에서 자동 반영되도록 하고, 현재 값(1.3.7 / 2026-09-19)으로 정정했다. `version:check`·typecheck·site 빌드 GREEN. |
|
||||||
|
|
@ -72,7 +72,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res
|
||||||
| GAP-MTG-03 | Meetings | Existing recordings could become plain transcription history, but not a meeting with linked audio and minutes. | desktop `MeetingModeService`, `meeting/imported-recording.ts`, `meeting-mode-handlers.ts`; mobile `MeetingsScreen` → `RecordScreen`; MTG-13 | `[~]` 2026-11-02: installed Windows 1.16.0 passed native picker→timestamped transcript→local summary/action item with a real WAV (`2026-11-02-verification.md`). Desktop GUI gate is complete; authenticated Android picker→upload→transcript→minutes on Fold6 remains. |
|
| GAP-MTG-03 | Meetings | Existing recordings could become plain transcription history, but not a meeting with linked audio and minutes. | desktop `MeetingModeService`, `meeting/imported-recording.ts`, `meeting-mode-handlers.ts`; mobile `MeetingsScreen` → `RecordScreen`; MTG-13 | `[~]` 2026-11-02: installed Windows 1.16.0 passed native picker→timestamped transcript→local summary/action item with a real WAV (`2026-11-02-verification.md`). Desktop GUI gate is complete; authenticated Android picker→upload→transcript→minutes on Fold6 remains. |
|
||||||
| GAP-MTG-04 | Meetings | Learned typing vocabulary never reached meeting transcription: STT used a hardcoded Korean hint, refine had no glossary, refined lines stopped inside `CaptionService`, and the stored transcript was raw segments. | `packages/core/src/transcript-correction.ts`, `apps/desktop/src/main/services/TranscriptGlossaryService.ts`, `CaptionService.ts`, `meeting/MeetingRecordingSession.ts`, `MeetingModeService.ts`, `FileTranscriptionService.ts`, `VoiceModeService.ts`; MTG-14 | `[~]` 2026-11-05: one glossary SSOT wired into caption, meeting, file transcription and dictation; refined lines now propagate to the meeting transcript and renderer (`meetingMode:segmentUpdated`). **Direct measurement against the real local database** (`users/_local/d3ro.db`: 1,952 learned phrases / 2,522 typing samples / 3 meeting transcripts) exposed that the first cut also rewrote ordinary Korean (286 of 3,005 words: 하면→라면, 이제→이게, 매일→메일, 정보→정도), and v1.16.3 restricts deterministic correction to dictionary pronunciations plus typed Latin identifiers — re-measured **0 of 3,005**. Real-engine check with the local sidecar (`large-v3-turbo`): a Korean TTS fixture containing the user term transcribes as 하람로그에 with no hint and haramlog에 with the learned hint; a dictionary pronunciation entry maps 디에로 → D3RO. Hangul-layout artifacts (dkssudgktpdy) are excluded from the hint. Evidence: `packages/core/__tests__/transcript-correction.test.ts` 16/16, `apps/desktop/tests/main/services/transcript-glossary.test.ts` 10/10, core 589/589, desktop offline suite, workspace typecheck, touched-file ESLint, `test:hygiene`. **Remaining:** a live meeting with real names/jargon by voice, and a packaged-install check of the new IPC event. |
|
| GAP-MTG-04 | Meetings | Learned typing vocabulary never reached meeting transcription: STT used a hardcoded Korean hint, refine had no glossary, refined lines stopped inside `CaptionService`, and the stored transcript was raw segments. | `packages/core/src/transcript-correction.ts`, `apps/desktop/src/main/services/TranscriptGlossaryService.ts`, `CaptionService.ts`, `meeting/MeetingRecordingSession.ts`, `MeetingModeService.ts`, `FileTranscriptionService.ts`, `VoiceModeService.ts`; MTG-14 | `[~]` 2026-11-05: one glossary SSOT wired into caption, meeting, file transcription and dictation; refined lines now propagate to the meeting transcript and renderer (`meetingMode:segmentUpdated`). **Direct measurement against the real local database** (`users/_local/d3ro.db`: 1,952 learned phrases / 2,522 typing samples / 3 meeting transcripts) exposed that the first cut also rewrote ordinary Korean (286 of 3,005 words: 하면→라면, 이제→이게, 매일→메일, 정보→정도), and v1.16.3 restricts deterministic correction to dictionary pronunciations plus typed Latin identifiers — re-measured **0 of 3,005**. Real-engine check with the local sidecar (`large-v3-turbo`): a Korean TTS fixture containing the user term transcribes as 하람로그에 with no hint and haramlog에 with the learned hint; a dictionary pronunciation entry maps 디에로 → D3RO. Hangul-layout artifacts (dkssudgktpdy) are excluded from the hint. Evidence: `packages/core/__tests__/transcript-correction.test.ts` 16/16, `apps/desktop/tests/main/services/transcript-glossary.test.ts` 10/10, core 589/589, desktop offline suite, workspace typecheck, touched-file ESLint, `test:hygiene`. **Remaining:** a live meeting with real names/jargon by voice, and a packaged-install check of the new IPC event. |
|
||||||
| GAP-REL-16 | Release | Forgejo release-page asset attachment for the ~91 MB installer timed out through Cloudflare (HTTP 524), although package registry upload and signed manifest succeeded. | `scripts/ci/publish-forgejo-release.mjs`, `scripts/ci/lib/immutable-package-guard.mjs` | `[x]` 2026-11-20: `v1.18.4`(`f77c86d`)의 `104,691,365-byte` 설치본·`latest.yml`·`.sig` Release 첨부가 모두 성공하고 공개 Release 설치본 Range GET도 HTTP 206이다. 과거 1.16.2~1.17.1의 524/ECONNRESET 이력과 달리 현재 경로는 완료했다. 증거: `docs/evidence/2026-11-17-backlog-operations.md`. |
|
| GAP-REL-16 | Release | Forgejo release-page asset attachment for the ~91 MB installer timed out through Cloudflare (HTTP 524), although package registry upload and signed manifest succeeded. | `scripts/ci/publish-forgejo-release.mjs`, `scripts/ci/lib/immutable-package-guard.mjs` | `[x]` 2026-11-20: `v1.18.4`(`f77c86d`)의 `104,691,365-byte` 설치본·`latest.yml`·`.sig` Release 첨부가 모두 성공하고 공개 Release 설치본 Range GET도 HTTP 206이다. 과거 1.16.2~1.17.1의 524/ECONNRESET 이력과 달리 현재 경로는 완료했다. 증거: `docs/evidence/2026-11-17-backlog-operations.md`. |
|
||||||
| GAP-REL-17 | Release | 설치된 1.17.1은 자동 업데이트를 정상 확인하지만 공개 피드도 1.17.1이라 1.18.x 제안이 나오지 않았다. 미게시 1.18.1·1.18.2 설치본이 각각 120,821,996·120,821,907 bytes(115.2 MiB)라 100 MiB 업로드 게이트에서 중단됐고, 버전 태그와 원격 피드가 어긋났다. | `apps/desktop/electron-builder.yml`, `scripts/ci/{build-desktop-installer,release-desktop,publish-forgejo-release}.mjs`, `docs/evidence/2026-11-17-backlog-operations.md` | `[~]` 2026-11-20: `1.18.4`(`f77c86d`)는 `!release/**`·명시적 `out/**/*`, source map·미사용 플랫폼 바이너리 제외로 `104,691,365 bytes`가 됐다. Windows는 `.blockmap` 대신 전체 설치본을 받는다(`fullInstallVersionGap=0`). 빌드·native DB·smoke(3 valid/10 negative)·공개 피드·signed manifest·Release 자산 모두 GREEN. `.env` Forgejo token 401은 남아 있고 이번 게시는 유효한 기존 Git credential을 프로세스 메모리에서만 사용했다. **남은 것:** 1.17.1 실제 앱의 설정→정보→업데이트 제안·다운로드·재시작 GUI 확인. |
|
| GAP-REL-17 | Release | 설치된 1.17.1은 자동 업데이트를 정상 확인하지만 공개 피드도 1.17.1이라 1.18.x 제안이 나오지 않았다. 미게시 1.18.1·1.18.2 설치본이 각각 120,821,996·120,821,907 bytes(115.2 MiB)라 100 MiB 업로드 게이트에서 중단됐고, 버전 태그와 원격 피드가 어긋났다. | `apps/desktop/electron-builder.yml`, `scripts/ci/{build-desktop-installer,release-desktop,publish-forgejo-release}.mjs`, `docs/evidence/2026-11-17-backlog-operations.md` | `[x]` 2026-11-21: `1.18.4`(`f77c86d`, `104,691,365 bytes`)의 제안 발견·전체 설치본 다운로드·Ed25519 서명 검증·`quitAndInstall`·재시작·기존 DB 열기를 실제 설치 앱 로그로 확인했다. ProductVersion `1.18.4.0`, 이후 최신 버전 확인 및 실제 화면 OCR 사용도 검증했다. Windows full-only와 packaging exclusions는 유지한다. `.env` Forgejo token 401은 별도 교체 대상이며 이번 게시는 유효한 기존 Git credential을 프로세스 메모리에서만 사용했다. |
|
||||||
| GAP-INFRA-01 | Build | `apps/mobile-rn` is outside npm workspaces, so root `typecheck`/`test`/`lint` skip it. `typecheck:mobile`/`lint:mobile`/`test:mobile`/`verify:all` root scripts added 2026-09-13 (`package.json`), but membership/CI integration is still open. | `package.json`, `.forgejo/workflows/ci.yml`, `.gitlab-ci.yml` | `[x]` 2026-10-30: React Native Metro/Gradle 네이티브 오토링킹 격리를 위해 `apps/mobile-rn`은 독립 `node_modules`로 유지하고, 루트 `verify:all` 및 `.forgejo/workflows/ci.yml`·`.gitlab-ci.yml`의 `mobile-quality` 잡이 모바일 `lint`·`typecheck`·`test:ci`를 필수 게이트로 실행하도록 정본화했다. **2026-11-04:** root `test:mobile`도 watch-capable 기본 Jest가 아니라 mobile `test:ci`(`jest --runInBand`)를 호출하도록 고정했다. |
|
| GAP-INFRA-01 | Build | `apps/mobile-rn` is outside npm workspaces, so root `typecheck`/`test`/`lint` skip it. `typecheck:mobile`/`lint:mobile`/`test:mobile`/`verify:all` root scripts added 2026-09-13 (`package.json`), but membership/CI integration is still open. | `package.json`, `.forgejo/workflows/ci.yml`, `.gitlab-ci.yml` | `[x]` 2026-10-30: React Native Metro/Gradle 네이티브 오토링킹 격리를 위해 `apps/mobile-rn`은 독립 `node_modules`로 유지하고, 루트 `verify:all` 및 `.forgejo/workflows/ci.yml`·`.gitlab-ci.yml`의 `mobile-quality` 잡이 모바일 `lint`·`typecheck`·`test:ci`를 필수 게이트로 실행하도록 정본화했다. **2026-11-04:** root `test:mobile`도 watch-capable 기본 Jest가 아니라 mobile `test:ci`(`jest --runInBand`)를 호출하도록 고정했다. |
|
||||||
| GAP-MOB-01 | Legacy | `apps/mobile` Expo skeleton duplicated auth/data code and got version-sync edits. | SSOT G-002 | `[x]` 2026-09-13: deleted `apps/mobile`, removed from `sync-version.mjs` and `package-lock.json`; `version:check` GREEN. |
|
| GAP-MOB-01 | Legacy | `apps/mobile` Expo skeleton duplicated auth/data code and got version-sync edits. | SSOT G-002 | `[x]` 2026-09-13: deleted `apps/mobile`, removed from `sync-version.mjs` and `package-lock.json`; `version:check` GREEN. |
|
||||||
| GAP-INFRA-02 | CI | GitLab admin NAS deploy job is disabled; admin deploy is manual/GHCR. | `.gitlab-ci.yml`, `docs/deployment/nas-deploy-runbook.md` | `[x]` 2026-10-30: 임시 CI DinD 데몬만 바꾸던 구 잡 대신 `docker-compose.nas.yml` 기반의 정본 배포·헬스체크·롤백 절차를 `docs/deployment/nas-deploy-runbook.md`로 문서화하고 `.gitlab-ci.yml` 및 `02-infrastructure.md`에 연결했다. |
|
| GAP-INFRA-02 | CI | GitLab admin NAS deploy job is disabled; admin deploy is manual/GHCR. | `.gitlab-ci.yml`, `docs/deployment/nas-deploy-runbook.md` | `[x]` 2026-10-30: 임시 CI DinD 데몬만 바꾸던 구 잡 대신 `docker-compose.nas.yml` 기반의 정본 배포·헬스체크·롤백 절차를 `docs/deployment/nas-deploy-runbook.md`로 문서화하고 `.gitlab-ci.yml` 및 `02-infrastructure.md`에 연결했다. |
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,64 @@ describe('선택 → 텍스트', () => {
|
||||||
expect(selectionText(result, allWords(result), { singleLine: true })).toBe('日本語 OCR テスト次の行')
|
expect(selectionText(result, allWords(result), { singleLine: true })).toBe('日本語 OCR テスト次の行')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('selectionText_주소와기호가여러단어로인식된경우_좁은픽셀간격은공백없이잇는다', () => {
|
||||||
|
const result = parseOcrEngineOutput({
|
||||||
|
lang: 'ko',
|
||||||
|
lines: [
|
||||||
|
{
|
||||||
|
words: [
|
||||||
|
{ t: '"https', x: 10, y: 10, w: 63, h: 18.5 },
|
||||||
|
{ t: '://api.example.com/v1/chat', x: 78, y: 10, w: 281.5, h: 18.5 },
|
||||||
|
{ t: '?model=gpt-4&lang=ko', x: 363, y: 10, w: 216.5, h: 18.5 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
words: [
|
||||||
|
{ t: 'user.name+tag@example.', x: 10, y: 50, w: 237.5, h: 18.5 },
|
||||||
|
{ t: 'co.', x: 252, y: 58, w: 28.5, h: 10.5 },
|
||||||
|
{ t: 'kr', x: 285.5, y: 54, w: 20, h: 14.5 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
if (!result) throw new Error('no result')
|
||||||
|
expect(selectionText(result, allWords(result))).toBe(
|
||||||
|
'"https://api.example.com/v1/chat?model=gpt-4&lang=ko\nuser.name+tag@example.co.kr'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('selectionText_일반단어사이의넓은픽셀간격_공백을유지한다', () => {
|
||||||
|
const result = parseOcrEngineOutput({
|
||||||
|
lang: 'ko',
|
||||||
|
lines: [
|
||||||
|
{
|
||||||
|
words: [
|
||||||
|
{ t: 'const', x: 10, y: 10, w: 53.5, h: 13.5 },
|
||||||
|
{ t: 'url', x: 76, y: 9, w: 31.5, h: 14.5 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
if (!result) throw new Error('no result')
|
||||||
|
expect(selectionText(result, allWords(result))).toBe('const url')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('selectionText_자간이좁은일반문장_실제단어공백은유지한다', () => {
|
||||||
|
const result = parseOcrEngineOutput({
|
||||||
|
lang: 'en-US',
|
||||||
|
lines: [
|
||||||
|
{
|
||||||
|
words: [
|
||||||
|
{ t: 'hello', x: 10, y: 10, w: 25, h: 16 },
|
||||||
|
{ t: 'world', x: 39, y: 10, w: 30, h: 16 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
if (!result) throw new Error('no result')
|
||||||
|
expect(selectionText(result, allWords(result))).toBe('hello world')
|
||||||
|
})
|
||||||
|
|
||||||
it('selectionText_아무것도안고름_빈문자열', () => {
|
it('selectionText_아무것도안고름_빈문자열', () => {
|
||||||
expect(selectionText(sample(), [])).toBe('')
|
expect(selectionText(sample(), [])).toBe('')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
// 1) OCR 결과 표현 — OcrResult / OcrLine / OcrWord (좌표는 캡처 이미지의 **물리 픽셀**)
|
// 1) OCR 결과 표현 — OcrResult / OcrLine / OcrWord (좌표는 캡처 이미지의 **물리 픽셀**)
|
||||||
// 2) 엔진 출력 해석 — parseOcrEngineOutput (엔진이 준 JSON 을 검증해 정본 표현으로)
|
// 2) 엔진 출력 해석 — parseOcrEngineOutput (엔진이 준 JSON 을 검증해 정본 표현으로)
|
||||||
// 3) 선택 계산 — 사각형 선택(wordsInRect) · 글 흐름 선택(flowSelection) · 단어/줄 선택
|
// 3) 선택 계산 — 사각형 선택(wordsInRect) · 글 흐름 선택(flowSelection) · 단어/줄 선택
|
||||||
// 4) 선택 → 텍스트 — selectionText (줄바꿈 유지 / 한 줄, CJK 는 공백 없이 잇기)
|
// 4) 선택 → 텍스트 — selectionText (줄바꿈 유지 / 한 줄, CJK · 주소/기호 토큰 공백 복원)
|
||||||
// 5) 강조 사각형 — selectionHighlightRects (줄 단위로 이어 붙인 사각형)
|
// 5) 강조 사각형 — selectionHighlightRects (줄 단위로 이어 붙인 사각형)
|
||||||
// 6) 검색 가능한 PDF 문서 — buildSearchablePdfHtml (그림 아래에 실제 글자를 깐다)
|
// 6) 검색 가능한 PDF 문서 — buildSearchablePdfHtml (그림 아래에 실제 글자를 깐다)
|
||||||
// 7) 부가 판정 — chooseOcrScale · detectLinks · pickTranslationTarget
|
// 7) 부가 판정 — chooseOcrScale · detectLinks · pickTranslationTarget
|
||||||
|
|
@ -254,9 +254,14 @@ function firstChar(text: string): string {
|
||||||
return Array.from(text)[0] ?? ''
|
return Array.from(text)[0] ?? ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 한 줄 안에서 이웃한 두 단어 사이에 공백을 넣을지. 일본어 · 중국어는 엔진이 글자마다 단어로 준다. */
|
/** 일본어 · 중국어와 좁은 간격의 주소 · 기호 토큰은 붙이되 일반 단어의 띄어쓰기는 유지한다. */
|
||||||
function joiner(previous: string, next: string): string {
|
function joiner(previous: string, next: string, gapRatio: number | null = null): string {
|
||||||
return isUnspacedScript(lastChar(previous)) && isUnspacedScript(firstChar(next)) ? '' : ' '
|
const last = lastChar(previous)
|
||||||
|
const first = firstChar(next)
|
||||||
|
if (isUnspacedScript(last) && isUnspacedScript(first)) return ''
|
||||||
|
if (gapRatio === null || gapRatio > 0.6) return ' '
|
||||||
|
if (gapRatio <= 0.05) return ''
|
||||||
|
return /[./:\\]/u.test(last) || /^[:/?#@.&=+_~$-]/u.test(first) ? '' : ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SelectionTextOptions {
|
export interface SelectionTextOptions {
|
||||||
|
|
@ -279,15 +284,18 @@ export function selectionText(
|
||||||
const lines: string[] = []
|
const lines: string[] = []
|
||||||
let currentLine = -1
|
let currentLine = -1
|
||||||
let buffer = ''
|
let buffer = ''
|
||||||
|
let previousWord: OcrWord | null = null
|
||||||
for (const index of picked) {
|
for (const index of picked) {
|
||||||
const word = result.words[index]
|
const word = result.words[index]
|
||||||
if (word.line !== currentLine) {
|
if (word.line !== currentLine) {
|
||||||
if (currentLine !== -1) lines.push(buffer)
|
if (currentLine !== -1) lines.push(buffer)
|
||||||
currentLine = word.line
|
currentLine = word.line
|
||||||
buffer = word.text
|
buffer = word.text
|
||||||
} else {
|
} else if (previousWord) {
|
||||||
buffer += joiner(buffer, word.text) + word.text
|
const gapRatio = (word.x - previousWord.x - previousWord.width) / Math.max(previousWord.height, word.height)
|
||||||
|
buffer += joiner(buffer, word.text, gapRatio) + word.text
|
||||||
}
|
}
|
||||||
|
previousWord = word
|
||||||
}
|
}
|
||||||
if (currentLine !== -1) lines.push(buffer)
|
if (currentLine !== -1) lines.push(buffer)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Bereich",
|
"screenOcr.modeRect": "Bereich",
|
||||||
"screenOcr.copy": "Kopieren",
|
"screenOcr.copy": "Kopieren",
|
||||||
"screenOcr.copyLine": "Als eine Zeile kopieren",
|
"screenOcr.copyLine": "Als eine Zeile kopieren",
|
||||||
|
"screenOcr.precision": "Präzise lesen",
|
||||||
|
"screenOcr.workingPrecision": "Erneutes Lesen mit lokalem GLM-OCR… Beim ersten Lauf werden etwa 2,7 GB Modelldaten heruntergeladen.",
|
||||||
|
"screenOcr.resultPrecision": "Ergebnis der präzisen Erkennung",
|
||||||
|
"screenOcr.errorPrecision": "Präzises Lesen fehlgeschlagen. Der Originaltext bleibt unverändert.",
|
||||||
"screenOcr.copyImage": "Bild kopieren",
|
"screenOcr.copyImage": "Bild kopieren",
|
||||||
"screenOcr.saveImage": "Bild speichern",
|
"screenOcr.saveImage": "Bild speichern",
|
||||||
"screenOcr.savePdf": "PDF speichern",
|
"screenOcr.savePdf": "PDF speichern",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Area",
|
"screenOcr.modeRect": "Area",
|
||||||
"screenOcr.copy": "Copy",
|
"screenOcr.copy": "Copy",
|
||||||
"screenOcr.copyLine": "Copy as one line",
|
"screenOcr.copyLine": "Copy as one line",
|
||||||
|
"screenOcr.precision": "Precise read",
|
||||||
|
"screenOcr.workingPrecision": "Reading again with local GLM-OCR… The first run downloads about 2.7 GB of model data.",
|
||||||
|
"screenOcr.resultPrecision": "Precise recognition result",
|
||||||
|
"screenOcr.errorPrecision": "Precise reading failed. The original text is unchanged.",
|
||||||
"screenOcr.copyImage": "Copy image",
|
"screenOcr.copyImage": "Copy image",
|
||||||
"screenOcr.saveImage": "Save image",
|
"screenOcr.saveImage": "Save image",
|
||||||
"screenOcr.savePdf": "Save PDF",
|
"screenOcr.savePdf": "Save PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Área",
|
"screenOcr.modeRect": "Área",
|
||||||
"screenOcr.copy": "Copiar",
|
"screenOcr.copy": "Copiar",
|
||||||
"screenOcr.copyLine": "Copiar en una línea",
|
"screenOcr.copyLine": "Copiar en una línea",
|
||||||
|
"screenOcr.precision": "Lectura precisa",
|
||||||
|
"screenOcr.workingPrecision": "Leyendo de nuevo con GLM-OCR local… La primera ejecución descarga unos 2,7 GB del modelo.",
|
||||||
|
"screenOcr.resultPrecision": "Resultado del reconocimiento preciso",
|
||||||
|
"screenOcr.errorPrecision": "La lectura precisa falló. El texto original no se modificó.",
|
||||||
"screenOcr.copyImage": "Copiar imagen",
|
"screenOcr.copyImage": "Copiar imagen",
|
||||||
"screenOcr.saveImage": "Guardar imagen",
|
"screenOcr.saveImage": "Guardar imagen",
|
||||||
"screenOcr.savePdf": "Guardar PDF",
|
"screenOcr.savePdf": "Guardar PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Zone",
|
"screenOcr.modeRect": "Zone",
|
||||||
"screenOcr.copy": "Copier",
|
"screenOcr.copy": "Copier",
|
||||||
"screenOcr.copyLine": "Copier sur une ligne",
|
"screenOcr.copyLine": "Copier sur une ligne",
|
||||||
|
"screenOcr.precision": "Lecture précise",
|
||||||
|
"screenOcr.workingPrecision": "Nouvelle lecture avec GLM-OCR local… Le premier lancement télécharge environ 2,7 Go de modèle.",
|
||||||
|
"screenOcr.resultPrecision": "Résultat de la reconnaissance précise",
|
||||||
|
"screenOcr.errorPrecision": "Échec de la lecture précise. Le texte d’origine est inchangé.",
|
||||||
"screenOcr.copyImage": "Copier l’image",
|
"screenOcr.copyImage": "Copier l’image",
|
||||||
"screenOcr.saveImage": "Enregistrer l’image",
|
"screenOcr.saveImage": "Enregistrer l’image",
|
||||||
"screenOcr.savePdf": "Enregistrer en PDF",
|
"screenOcr.savePdf": "Enregistrer en PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "範囲選択",
|
"screenOcr.modeRect": "範囲選択",
|
||||||
"screenOcr.copy": "コピー",
|
"screenOcr.copy": "コピー",
|
||||||
"screenOcr.copyLine": "1 行でコピー",
|
"screenOcr.copyLine": "1 行でコピー",
|
||||||
|
"screenOcr.precision": "高精度で読み取り",
|
||||||
|
"screenOcr.workingPrecision": "ローカルGLM-OCRで再読み取り中… 初回は約2.7GBのモデルをダウンロードします。",
|
||||||
|
"screenOcr.resultPrecision": "高精度な認識結果",
|
||||||
|
"screenOcr.errorPrecision": "高精度な読み取りに失敗しました。元のテキストは変更されていません。",
|
||||||
"screenOcr.copyImage": "画像をコピー",
|
"screenOcr.copyImage": "画像をコピー",
|
||||||
"screenOcr.saveImage": "画像を保存",
|
"screenOcr.saveImage": "画像を保存",
|
||||||
"screenOcr.savePdf": "PDF を保存",
|
"screenOcr.savePdf": "PDF を保存",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "영역 선택",
|
"screenOcr.modeRect": "영역 선택",
|
||||||
"screenOcr.copy": "복사",
|
"screenOcr.copy": "복사",
|
||||||
"screenOcr.copyLine": "한 줄로 복사",
|
"screenOcr.copyLine": "한 줄로 복사",
|
||||||
|
"screenOcr.precision": "정밀 읽기",
|
||||||
|
"screenOcr.workingPrecision": "로컬 GLM-OCR로 다시 읽는 중… 첫 실행에는 약 2.7GB 모델을 날받습니다.",
|
||||||
|
"screenOcr.resultPrecision": "정밀 인식 결과",
|
||||||
|
"screenOcr.errorPrecision": "정밀 읽기에 실패했습니다. 원문은 그대로 유지됩니다.",
|
||||||
"screenOcr.copyImage": "이미지 복사",
|
"screenOcr.copyImage": "이미지 복사",
|
||||||
"screenOcr.saveImage": "이미지 저장",
|
"screenOcr.saveImage": "이미지 저장",
|
||||||
"screenOcr.savePdf": "PDF 저장",
|
"screenOcr.savePdf": "PDF 저장",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Área",
|
"screenOcr.modeRect": "Área",
|
||||||
"screenOcr.copy": "Copiar",
|
"screenOcr.copy": "Copiar",
|
||||||
"screenOcr.copyLine": "Copiar em uma linha",
|
"screenOcr.copyLine": "Copiar em uma linha",
|
||||||
|
"screenOcr.precision": "Leitura precisa",
|
||||||
|
"screenOcr.workingPrecision": "Lendo novamente com GLM-OCR local… A primeira execução baixa cerca de 2,7 GB do modelo.",
|
||||||
|
"screenOcr.resultPrecision": "Resultado do reconhecimento preciso",
|
||||||
|
"screenOcr.errorPrecision": "Falha na leitura precisa. O texto original permanece inalterado.",
|
||||||
"screenOcr.copyImage": "Copiar imagem",
|
"screenOcr.copyImage": "Copiar imagem",
|
||||||
"screenOcr.saveImage": "Salvar imagem",
|
"screenOcr.saveImage": "Salvar imagem",
|
||||||
"screenOcr.savePdf": "Salvar PDF",
|
"screenOcr.savePdf": "Salvar PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Область",
|
"screenOcr.modeRect": "Область",
|
||||||
"screenOcr.copy": "Копировать",
|
"screenOcr.copy": "Копировать",
|
||||||
"screenOcr.copyLine": "Копировать одной строкой",
|
"screenOcr.copyLine": "Копировать одной строкой",
|
||||||
|
"screenOcr.precision": "Точное чтение",
|
||||||
|
"screenOcr.workingPrecision": "Повторное чтение с помощью локальной GLM-OCR… При первом запуске будет загружено около 2,7 ГБ данных модели.",
|
||||||
|
"screenOcr.resultPrecision": "Результат точного распознавания",
|
||||||
|
"screenOcr.errorPrecision": "Не удалось выполнить точное чтение. Исходный текст не изменился.",
|
||||||
"screenOcr.copyImage": "Копировать изображение",
|
"screenOcr.copyImage": "Копировать изображение",
|
||||||
"screenOcr.saveImage": "Сохранить изображение",
|
"screenOcr.saveImage": "Сохранить изображение",
|
||||||
"screenOcr.savePdf": "Сохранить PDF",
|
"screenOcr.savePdf": "Сохранить PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "เลือกพื้นที่",
|
"screenOcr.modeRect": "เลือกพื้นที่",
|
||||||
"screenOcr.copy": "คัดลอก",
|
"screenOcr.copy": "คัดลอก",
|
||||||
"screenOcr.copyLine": "คัดลอกเป็นบรรทัดเดียว",
|
"screenOcr.copyLine": "คัดลอกเป็นบรรทัดเดียว",
|
||||||
|
"screenOcr.precision": "อ่านอย่างละเอียด",
|
||||||
|
"screenOcr.workingPrecision": "กำลังอ่านซ้ำด้วย GLM-OCR ในเครื่อง… การรันครั้งแรกจะดาวน์โหลดโมเดลประมาณ 2.7 GB",
|
||||||
|
"screenOcr.resultPrecision": "ผลการจดจำอย่างละเอียด",
|
||||||
|
"screenOcr.errorPrecision": "การอ่านอย่างละเอียดล้มเหลว ข้อความต้นฉบับไม่เปลี่ยนแปลง",
|
||||||
"screenOcr.copyImage": "คัดลอกรูปภาพ",
|
"screenOcr.copyImage": "คัดลอกรูปภาพ",
|
||||||
"screenOcr.saveImage": "บันทึกรูปภาพ",
|
"screenOcr.saveImage": "บันทึกรูปภาพ",
|
||||||
"screenOcr.savePdf": "บันทึก PDF",
|
"screenOcr.savePdf": "บันทึก PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "Chọn vùng",
|
"screenOcr.modeRect": "Chọn vùng",
|
||||||
"screenOcr.copy": "Sao chép",
|
"screenOcr.copy": "Sao chép",
|
||||||
"screenOcr.copyLine": "Sao chép thành một dòng",
|
"screenOcr.copyLine": "Sao chép thành một dòng",
|
||||||
|
"screenOcr.precision": "Đọc chính xác",
|
||||||
|
"screenOcr.workingPrecision": "Đang đọc lại bằng GLM-OCR cục bộ… Lần chạy đầu sẽ tải khoảng 2,7 GB mô hình.",
|
||||||
|
"screenOcr.resultPrecision": "Kết quả nhận dạng chính xác",
|
||||||
|
"screenOcr.errorPrecision": "Đọc chính xác thất bại. Văn bản gốc không thay đổi.",
|
||||||
"screenOcr.copyImage": "Sao chép ảnh",
|
"screenOcr.copyImage": "Sao chép ảnh",
|
||||||
"screenOcr.saveImage": "Lưu ảnh",
|
"screenOcr.saveImage": "Lưu ảnh",
|
||||||
"screenOcr.savePdf": "Lưu PDF",
|
"screenOcr.savePdf": "Lưu PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "選取區域",
|
"screenOcr.modeRect": "選取區域",
|
||||||
"screenOcr.copy": "複製",
|
"screenOcr.copy": "複製",
|
||||||
"screenOcr.copyLine": "複製為一行",
|
"screenOcr.copyLine": "複製為一行",
|
||||||
|
"screenOcr.precision": "精確辨識",
|
||||||
|
"screenOcr.workingPrecision": "正在使用本機 GLM-OCR 重新辨識… 首次執行將下載約 2.7 GB 的模型。",
|
||||||
|
"screenOcr.resultPrecision": "精確辨識結果",
|
||||||
|
"screenOcr.errorPrecision": "精確辨識失敗。原始文字保持不變。",
|
||||||
"screenOcr.copyImage": "複製圖片",
|
"screenOcr.copyImage": "複製圖片",
|
||||||
"screenOcr.saveImage": "儲存圖片",
|
"screenOcr.saveImage": "儲存圖片",
|
||||||
"screenOcr.savePdf": "儲存 PDF",
|
"screenOcr.savePdf": "儲存 PDF",
|
||||||
|
|
|
||||||
|
|
@ -2510,6 +2510,10 @@
|
||||||
"screenOcr.modeRect": "选择区域",
|
"screenOcr.modeRect": "选择区域",
|
||||||
"screenOcr.copy": "复制",
|
"screenOcr.copy": "复制",
|
||||||
"screenOcr.copyLine": "复制为一行",
|
"screenOcr.copyLine": "复制为一行",
|
||||||
|
"screenOcr.precision": "精确识别",
|
||||||
|
"screenOcr.workingPrecision": "正在使用本地 GLM-OCR 重新识别… 首次运行将下载约 2.7 GB 的模型。",
|
||||||
|
"screenOcr.resultPrecision": "精确识别结果",
|
||||||
|
"screenOcr.errorPrecision": "精确识别失败。原始文本保持不变。",
|
||||||
"screenOcr.copyImage": "复制图片",
|
"screenOcr.copyImage": "复制图片",
|
||||||
"screenOcr.saveImage": "保存图片",
|
"screenOcr.saveImage": "保存图片",
|
||||||
"screenOcr.savePdf": "保存 PDF",
|
"screenOcr.savePdf": "保存 PDF",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue