feat: 统一手动发送入口为文字转语音

- 移除普通文本、图片和本地语音的手动发送入口
- 保留文字转语音的生成、试听和发送能力
This commit is contained in:
Wxw-Gu
2026-09-04 15:05:04 +08:00
parent 517e650942
commit 454f449c41
19 changed files with 478 additions and 801 deletions
+13 -8
View File
@@ -133,18 +133,23 @@ describe('preload IPC contract', () => {
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:checkStatus', '4567')
await api.rebindPersonalWechatSender()
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:rebind')
const sendRequest = {
const ttsRequest = {
to: 'fixture@chatroom',
type: 'text' as const,
text: '测试消息',
isGroup: true
isGroup: true,
filePath: '/tmp/generated.mp3'
}
await api.sendPersonalWechatMessage(sendRequest)
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:send', sendRequest)
await api.sendGeneratedTtsVoice(ttsRequest)
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:sendGeneratedTtsVoice', ttsRequest)
const reportImageRequest = {
type: 'image' as const,
to: 'fixture@chatroom',
isGroup: true,
filePath: '/tmp/report.png'
}
await api.sendPersonalWechatMessage(reportImageRequest)
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:send', reportImageRequest)
await api.getPersonalWechatVoiceDiagnostic()
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:getVoiceDiagnostic')
await api.selectPersonalWechatImage()
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:selectImage')
await api.getScheduledReportNotificationSettings()
expect(invoke).toHaveBeenLastCalledWith('scheduled-report:getNotificationSettings')