feat #14740: updater and release scripts

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 11:37:57 +01:00
co-authored by Claude Opus 5.5
parent 345dd01147
commit 74511d791a
15 changed files with 1157 additions and 10 deletions
+22
View File
@@ -100,6 +100,19 @@ export interface Account {
name: string
}
/** A newer version the release feed offers. */
export interface UpdateInfo {
version: string
/** `false` while a recording runs or a call is being processed. */
can_install: boolean
}
/** Download progress of an update; `total` is `null` if unknown. */
export interface UpdateProgress {
downloaded: number
total: number | null
}
export interface Levels {
mic: number
out: number
@@ -137,6 +150,9 @@ export const renameCall = (id: CallId, title: string | null) =>
export const listAccounts = () => invoke<Account[]>('list_accounts')
export const setAccount = (id: CallId, accountId: string | null) =>
invoke<void>('set_account', { id, accountId })
export const getUpdate = () => invoke<UpdateInfo | null>('get_update')
/** Resolves only on failure: on success the app restarts. */
export const installUpdate = () => invoke<void>('install_update')
export const onRecordingState = (handler: (state: RecordingState) => void): Promise<UnlistenFn> =>
listen<RecordingState>('recording-state', (event) => handler(event.payload))
@@ -148,6 +164,12 @@ export const onPromptChanged = (handler: () => void): Promise<UnlistenFn> =>
/** A call's status changed (processing started, done or failed). */
export const onCallUpdated = (handler: (id: CallId) => void): Promise<UnlistenFn> =>
listen<{ id: CallId }>('call-updated', (event) => handler(event.payload.id))
export const onUpdateAvailable = (handler: (info: UpdateInfo) => void): Promise<UnlistenFn> =>
listen<UpdateInfo>('update-available', (event) => handler(event.payload))
export const onUpdateProgress = (
handler: (progress: UpdateProgress) => void,
): Promise<UnlistenFn> =>
listen<UpdateProgress>('update-progress', (event) => handler(event.payload))
export const onLevels = (handler: (levels: Levels) => void): Promise<UnlistenFn> =>
listen<Levels>('levels', (event) => handler(event.payload))