fix(knowledge): make protected file downloads WebView-safe

This commit is contained in:
2026-07-24 13:31:30 +08:00
parent 83c497c5f1
commit 442ba66848
9 changed files with 233 additions and 20 deletions
+4
View File
@@ -24,9 +24,13 @@ test('问师傅支持显式新对话、版本回写和受控原文件或视频
assert.match(header, /class="new-chat-text">新对话/);
assert.match(page, /const contextVersion = ref\(0\)/);
assert.match(page, /applyConversationState\(nextResult\)/);
assert.match(page, /requestKnowledgeResourceDownloadLink\(resource\.attachmentId\)/);
assert.match(page, /authenticatedFileUrl\(resource\.contentUrl\)/);
assert.match(page, /releaseAuthenticatedFileUrl\(resource\.localUrl\)/);
assert.match(page, /resource\.type === 'VIDEO' && resource\.localUrl/);
assert.doesNotMatch(page, /link\.href = localUrl/);
assert.match(page, /link\.rel = 'noreferrer'/);
assert.match(page, /点击下载原文件/);
assert.match(page, /msg\.result\.rewrittenQuery !== msg\.result\.queryText/);
assert.match(page, /已结合本次对话理解/);
});