초기 프로젝트 설정: 하네스 시스템 + 설계서 + RE 노하우
- CLAUDE.md: 프로젝트 규칙, 기술 스택, 코딩 규칙, 페이즈 로드맵 - .claude/settings.json: 권한, 강제 훅 (매 프롬프트 설계서 규칙 주입) - .claude/skills/: implement-phase, review-phase, scaffold, test-commit, debug - .claude/agents/: electron-architect, voice-pipeline-expert, ui-specialist - docs/design/00-09: 마스터 아키텍처, 서비스 명세(16개), IPC(113채널), DB스키마, UI컴포넌트, 검증리포트, 외부엔진연동, 갭분석, VoiceMode패턴, 디자인시스템, 히스토리팝업 - docs/phases/1-7+3.5: 전체 구현 페이즈 문서 - docs/re-findings/: Speakly RE 노하우 5개 문서
This commit is contained in:
commit
e24bb8378c
35 changed files with 11452 additions and 0 deletions
39
docs/re-findings/text-insertion-patterns.md
Normal file
39
docs/re-findings/text-insertion-patterns.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# 텍스트 삽입 핵심 패턴
|
||||
|
||||
## ClipboardPaste 의사코드 (NativeHelper.dll에서 추출)
|
||||
```pseudocode
|
||||
function clipboardPaste(text):
|
||||
// 1. 기존 클립보드 저장 (모든 포맷 열거)
|
||||
savedClipboard = saveClipboard() // EnumClipboardFormats → GetClipboardData
|
||||
|
||||
// 2. 클립보드에 텍스트 설정
|
||||
OpenClipboard(NULL)
|
||||
EmptyClipboard()
|
||||
hMem = GlobalAlloc(GMEM_MOVEABLE, size)
|
||||
memcpy(GlobalLock(hMem), text, size)
|
||||
SetClipboardData(CF_UNICODETEXT, hMem)
|
||||
CloseClipboard()
|
||||
|
||||
// 3. Ctrl+V 시뮬레이션
|
||||
SendInput([KeyDown(VK_CONTROL), KeyDown(VK_V), KeyUp(VK_V), KeyUp(VK_CONTROL)])
|
||||
Sleep(delay)
|
||||
|
||||
// 4. 클립보드 복원
|
||||
restoreClipboard(savedClipboard)
|
||||
```
|
||||
|
||||
## 삽입 전략 (TextOperationStrategy)
|
||||
- insertMethod: 'clipboard' (기본) | 'keyboard'
|
||||
- selectMethod: 'clipboard' | 'ax' | 'none'
|
||||
- verifyMode: 'auto' | 'skip'
|
||||
- 앱별 레벨(level0-3): bundleId 기반 오버라이드
|
||||
|
||||
## EditMonitor (삽입 검증)
|
||||
- 삽입 후 5초 대기 → 커서 주변 텍스트 재캡처
|
||||
- before_input / system_input / after_input 비교
|
||||
- 서버 corrections → 사전 자동 추가
|
||||
|
||||
## D3RO-VOICE 적용
|
||||
- @nut-tree/nut-js의 keyboard.type() 또는 clipboard + keyboard.pressKey(Key.LeftControl, Key.V)
|
||||
- electron clipboard API로 save/restore
|
||||
- 검증은 초기에는 skip, 추후 UI Automation 추가 가능
|
||||
Loading…
Add table
Add a link
Reference in a new issue