Handle stage-voice-note and discard-voice-note IPC types.
Wire composer voice message staging through platform draft APIs. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1072,6 +1072,23 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'stage-voice-note') {
|
||||
const row = await platform.stageVoiceNoteDraft({
|
||||
data: fromBase64(msg.dataBase64),
|
||||
durationMs: msg.durationMs,
|
||||
mimeType: msg.mimeType,
|
||||
waveformPeaks: msg.waveformPeaks
|
||||
})
|
||||
send({ type: 'voice-note-staged', draft: row })
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'discard-voice-note') {
|
||||
await platform.discardVoiceNoteDraft()
|
||||
send({ type: 'voice-note-discarded' })
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'stage-attachment') {
|
||||
const att = await platform.stageAttachment({
|
||||
data: fromBase64(msg.dataBase64),
|
||||
|
||||
Reference in New Issue
Block a user