feat(desktop): propose typo fixes inside the suggestion popup and make suggestions snappier

While suggestions are on, typos are no longer replaced silently. The popup shows
the fix next to the candidate and applies it only when the candidate is accepted.
The per-minute request cap rises from 6 to 20 so suggestions keep appearing after
accepting one and continuing to type.
This commit is contained in:
Yun Chan 2026-10-18 07:06:55 +09:00
parent d63854db67
commit f5ae4c8c04
38 changed files with 1239 additions and 660 deletions

View file

@ -16,6 +16,11 @@ export interface KeyboardPort {
type(text: string): Promise<void>
/** 커서 앞 글자를 count 번 지운다 (오타 교정) */
backspace(count: number): Promise<void>
/**
* IME 가 조합 중인 글자를 확정시키고 공백 하나를 남긴다 (실제 Space 키) — 조합 중에 백스페이스를 보내면
* 글자가 아니라 낱자가 지워져(여 → ㅇ) 지울 개수가 어긋난다. 호출자는 남은 공백까지 지운다 (선택).
*/
commitComposition?(): Promise<void>
/** 네이티브 키 모듈을 미리 불러 둔다 — 첫 삽입이 로딩을 기다리지 않게 (선택) */
preload?(): Promise<void>
}
@ -98,6 +103,11 @@ export class NutKeyboardPort implements KeyboardPort {
await nut.native.type(text)
}
async commitComposition(): Promise<void> {
const nut = await this._ensureNut()
await nut.native.click(nut.Key.Space)
}
/** 백스페이스를 count 번 — 키마다 네이티브 keyTap 한 번이다. */
async backspace(count: number): Promise<void> {
if (count <= 0) return