feat: add bilingual release notes
This commit is contained in:
@@ -67,6 +67,7 @@ import type {
|
||||
ApplicationSettingsUpdate,
|
||||
VersionCheckResult
|
||||
} from '../shared/application-settings-contracts'
|
||||
import type { ReleaseNotesSnapshot } from '../shared/release-notes-contracts'
|
||||
import type {
|
||||
SpeechModelSnapshot,
|
||||
SpeechTranscriptionInput,
|
||||
@@ -331,6 +332,18 @@ const desktopApi: DesktopApi = {
|
||||
ipcRenderer.removeListener(ipcChannels.versionCheckResult, handler)
|
||||
}
|
||||
},
|
||||
releaseNotes: {
|
||||
getPending: () =>
|
||||
ipcRenderer.invoke(
|
||||
ipcChannels.releaseNotesGetPending
|
||||
) as Promise<ReleaseNotesSnapshot>,
|
||||
acknowledge: async (version: string) => {
|
||||
await ipcRenderer.invoke(
|
||||
ipcChannels.releaseNotesAcknowledge,
|
||||
{ version }
|
||||
)
|
||||
}
|
||||
},
|
||||
speechModels: {
|
||||
getSnapshot: () =>
|
||||
ipcRenderer.invoke(
|
||||
|
||||
@@ -59,4 +59,16 @@ describe('sandboxed preload', () => {
|
||||
expect(source).toContain('contextFileSelectionProgress')
|
||||
expect(source).toContain('ipcRenderer.removeListener(')
|
||||
})
|
||||
|
||||
it('exposes only bounded release-note actions', () => {
|
||||
const source = readFileSync(
|
||||
join(process.cwd(), 'src', 'preload', 'index.ts'),
|
||||
'utf8'
|
||||
)
|
||||
expect(source).toContain('releaseNotes: {')
|
||||
expect(source).toContain('getPending:')
|
||||
expect(source).toContain('acknowledge: async (version: string)')
|
||||
expect(source).toContain('ipcChannels.releaseNotesGetPending')
|
||||
expect(source).toContain('ipcChannels.releaseNotesAcknowledge')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user