feat(commands): multi-select ordered command pipeline with step reordering and single-pass composition (AI-05, AI-07)
This commit is contained in:
parent
f49acf0105
commit
10af20a0ad
157 changed files with 29455 additions and 913 deletions
|
|
@ -23,6 +23,7 @@ import { getVoiceCommandService } from './services/VoiceCommandService'
|
|||
import { getInputTelemetryService } from './services/InputTelemetryService'
|
||||
import { getSuggestionService } from './services/SuggestionService'
|
||||
import { initTypoCorrectionService } from './services/TypoCorrectionService'
|
||||
import { getLastNativeInputTick } from './utils/win32-input-activity'
|
||||
import { getPersonalGraphService } from './services/PersonalGraphService'
|
||||
import { getForegroundWindowInfo } from './utils/win32-foreground'
|
||||
import { getSoundEffectService } from './services/SoundEffectService'
|
||||
|
|
@ -220,17 +221,25 @@ async function initInputIntelligence(): Promise<void> {
|
|||
// Windows 에서는 KEYEVENTF_UNICODE 직접 타이핑('keyboard')을 기본으로 써서
|
||||
// 사용자의 클립보드(Win+V)를 오염시키거나 ClipboardSvcGroup 의 OpenClipboard 잠금과 충돌하지 않게 한다.
|
||||
const method = process.platform === 'win32' || configGet('insertMethod') === 'keyboard' ? 'keyboard' : 'clipboard'
|
||||
const baseLength = telemetry.currentTerminalPrefixLength()
|
||||
if (method === 'keyboard') {
|
||||
telemetry.expectProgrammaticKeys(deleteCount + (options?.commitComposition ? 2 : 0))
|
||||
}
|
||||
const result = await getTextInsertService().replaceBeforeCaret(deleteCount, text, method, options)
|
||||
let baseLength = telemetry.currentTerminalPrefixLength()
|
||||
const result = await getTextInsertService().replaceBeforeCaret(deleteCount, text, method, {
|
||||
...options,
|
||||
beforeApply: () => {
|
||||
options?.beforeApply?.()
|
||||
baseLength = telemetry.currentTerminalPrefixLength()
|
||||
if (method === 'keyboard') {
|
||||
telemetry.expectProgrammaticKeys(deleteCount + (options?.commitComposition ? 2 : 0))
|
||||
}
|
||||
}
|
||||
})
|
||||
if (result.success) {
|
||||
telemetry.applyProgrammaticReplacement(deleteCount, text, baseLength)
|
||||
}
|
||||
return result.success
|
||||
},
|
||||
lastKeyAt: () => telemetry.lastKeyAt,
|
||||
inputRevision: () => telemetry.inputRevision,
|
||||
nativeInputTick: getLastNativeInputTick,
|
||||
expectProgrammaticKeys: (count) => telemetry.expectProgrammaticKeys(count),
|
||||
expectProgrammaticInsert: (text) => telemetry.expectProgrammaticInsert(text),
|
||||
foregroundHandle: () => getForegroundWindowInfo()?.hwnd ?? null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue