feat: add secure remote channel media

This commit is contained in:
lofyer
2026-08-09 20:33:35 +08:00
parent 6c891f3522
commit 66b098ae36
46 changed files with 4403 additions and 1594 deletions
+1 -32
View File
@@ -75,11 +75,7 @@ import type {
} from '../shared/embedding-contracts'
import type { AgentRuntimeSelection } from '../shared/runtime-selection-contracts'
import type { WeixinBindingSnapshot } from '../shared/weixin-channel-contracts'
import type {
RemoteChannelActivity,
RemoteChannelApproval,
RemoteChannelApprovalDecision
} from '../shared/remote-channel-contracts'
import type { RemoteChannelActivity } from '../shared/remote-channel-contracts'
import type {
MagicNoteDetail,
MagicNotesSnapshot,
@@ -280,33 +276,6 @@ const desktopApi: DesktopApi = {
handler
)
},
respondRemoteApproval: (
approvalId: string,
decision: RemoteChannelApprovalDecision
) =>
ipcRenderer.invoke(ipcChannels.remoteChannelApprovalRespond, {
approvalId,
decision
}) as Promise<boolean>,
getPendingRemoteApprovals: () =>
ipcRenderer.invoke(
ipcChannels.remoteChannelApprovalList
) as Promise<RemoteChannelApproval[]>,
onRemoteApproval: (listener) => {
const handler = (
_event: Electron.IpcRendererEvent,
approval: RemoteChannelApproval
): void => listener(approval)
ipcRenderer.on(
ipcChannels.remoteChannelApprovalRequested,
handler
)
return () =>
ipcRenderer.removeListener(
ipcChannels.remoteChannelApprovalRequested,
handler
)
},
onRemoteActivity: (listener) => {
const handler = (
_event: Electron.IpcRendererEvent,