feat(caption): let live captions use their own speech model
The speech engine now keeps an auxiliary model next to the dictation model and transcribes with whichever the request names, reloading it once if the engine restarted. Settings > STT gains a live-caption model so captions can run on large-v3-turbo while dictation keeps its own model. The runtime minimum rises to 1.7.0 because older engines would silently ignore the model choice. Suggestion paging moves to Up/Down: the page follows the selection and the last item waits while more candidates are being generated. The Left/Right page shortcuts are removed; they did nothing until a page had filled and clash with Intel's display-rotation hotkeys.
This commit is contained in:
parent
39b8e7448e
commit
4b0f685941
29 changed files with 222 additions and 234 deletions
|
|
@ -114,13 +114,6 @@ describe('ConfigService suggestion tuning migration', () => {
|
|||
// 옮기지 않는 액션은 그대로 남는다.
|
||||
expect(bindings['suggestion-next']).toEqual(OLD_NEXT)
|
||||
expect(bindings['suggestion-prev']).toEqual(OLD_PREV)
|
||||
// accept/dismiss 가 비켜난 자리를 새 페이지 이동 액션이 충돌 없이 채운다.
|
||||
expect(bindings['suggestion-page-next']).toEqual([
|
||||
{ device: 'keyboard', code: 0x27, ctrl: true, alt: true, shift: false, meta: false }
|
||||
])
|
||||
expect(bindings['suggestion-page-prev']).toEqual([
|
||||
{ device: 'keyboard', code: 0x25, ctrl: true, alt: true, shift: false, meta: false }
|
||||
])
|
||||
expect(configGet('suggestionTuningRevision')).toBe(5)
|
||||
|
||||
resetInMemoryConfig()
|
||||
|
|
@ -151,31 +144,4 @@ describe('ConfigService suggestion tuning migration', () => {
|
|||
resetInMemoryConfig()
|
||||
})
|
||||
|
||||
it('revision 5: 새 페이지 이동 기본값이 다른 액션과 충돌하면 바인딩 없이 둔다', async () => {
|
||||
// suggestion-next 를 페이지-다음의 새 기본값(Ctrl+Alt+→)과 똑같이 커스터마이즈해 충돌을 만든다.
|
||||
const CONFLICTING_NEXT = [{ device: 'keyboard' as const, code: 0x27, ctrl: true, alt: true, shift: false, meta: false }]
|
||||
|
||||
vi.doMock('electron-store', () => ({
|
||||
default: makeTestStore({
|
||||
suggestionTuningRevision: 4,
|
||||
keyBindings: {
|
||||
'suggestion-next': CONFLICTING_NEXT
|
||||
}
|
||||
})
|
||||
}))
|
||||
const { configGet, initConfigService, resetInMemoryConfig } = await import(
|
||||
'../../../src/main/services/ConfigService'
|
||||
)
|
||||
await initConfigService()
|
||||
|
||||
const bindings = configGet('keyBindings')
|
||||
expect(bindings['suggestion-page-next']).toEqual([])
|
||||
// 충돌이 없는 page-prev 는 정상적으로 기본값을 받는다.
|
||||
expect(bindings['suggestion-page-prev']).toEqual([
|
||||
{ device: 'keyboard', code: 0x25, ctrl: true, alt: true, shift: false, meta: false }
|
||||
])
|
||||
expect(bindings['suggestion-next']).toEqual(CONFLICTING_NEXT)
|
||||
|
||||
resetInMemoryConfig()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -346,21 +346,25 @@ describe('SuggestionService warm-up', () => {
|
|||
expect(internal._lastSkipReason).not.toBe('rate-limited')
|
||||
})
|
||||
|
||||
it('pageNext는 다음 페이지 첫 항목으로, 후보가 없는 페이지면 그대로 둔다', async () => {
|
||||
it('마지막 후보에서 아직 더 만드는 중이면 next 는 제자리, 다 만들었으면 처음으로 돌아간다', async () => {
|
||||
const { getSuggestionService } = await import('../../../src/main/services/SuggestionService')
|
||||
const service = getSuggestionService()
|
||||
const internal = service as unknown as { _candidates: Array<{ text: string; rank: number }> }
|
||||
internal._candidates = Array.from({ length: 5 }, (_v, i) => ({ text: `후보${i}`, rank: i }))
|
||||
const internal = service as unknown as {
|
||||
_candidates: Array<{ text: string; rank: number }>
|
||||
_filling: boolean
|
||||
}
|
||||
internal._candidates = Array.from({ length: 4 }, (_v, i) => ({ text: `후보${i}`, rank: i }))
|
||||
|
||||
expect(service.getState().activeIndex).toBe(0)
|
||||
service.pageNext()
|
||||
for (let i = 0; i < 3; i += 1) service.next()
|
||||
// 3번째(0-based 3)에서 ↓ — 4번째 칸이 곧 페이지 2 로 넘어간 상태다.
|
||||
expect(service.getState().activeIndex).toBe(3)
|
||||
service.pageNext()
|
||||
// 5개뿐이라 다음 페이지가 없다 — 그대로 둔다.
|
||||
|
||||
internal._filling = true
|
||||
service.next()
|
||||
expect(service.getState().activeIndex).toBe(3)
|
||||
service.pagePrev()
|
||||
expect(service.getState().activeIndex).toBe(0)
|
||||
service.pagePrev()
|
||||
|
||||
internal._filling = false
|
||||
service.next()
|
||||
expect(service.getState().activeIndex).toBe(0)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue