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,6 +1,7 @@
import { describe, expect, it } from 'vitest'
import {
parseRemoteChannelPrompt
parseRemoteChannelPrompt,
requestsRemoteResultFile
} from './remote-channel-routing'
import { projectChannelLabels } from '../../shared/assistant-contracts'
@@ -40,6 +41,16 @@ describe('parseRemoteChannelPrompt', () => {
)
})
it('requires an explicit downloadable file request', () => {
expect(requestsRemoteResultFile('请生成一个文件,总结今天的进展')).toBe(
true
)
expect(
requestsRemoteResultFile('Please export the result as a file')
).toBe(true)
expect(requestsRemoteResultFile('请总结今天的进展')).toBe(false)
})
it('defines a stable product label for every managed channel', () => {
expect(projectChannelLabels).toEqual({
weixin: '微信 ClawBot',