fix(dsh): restore native file tools and official loading UI
Core regression / Python core and release configuration (push) Successful in 20s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 15s
Core regression / JavaScript syntax (pull_request) Successful in 3s

This commit is contained in:
阿白叔 committed 2026-11-04 19:05:21 +08:00
1 parent 1340f6c233
commit 705c15eb93
19 files changed
+398 -42

No files matched your search

+8 -3
View File
@@ -58,6 +58,10 @@ try {
await c.click(`document.querySelectorAll('button[aria-label="新建会话"]')[1]`);
await wait(`!!document.querySelector('[data-testid="dx-task-panel"]')`);
report.checks.push('native new conversation retains task dock');
if(process.argv.includes('--file-check')){
const {verifyFileUi}=await import('./verify_dsh_file_ui.mjs');
report.files=await verifyFileUi(c,output);
}
if(!liveModel) {
await c.click(`document.querySelector('button[aria-label="收起侧边栏"]')`);
await wait(`!!document.querySelector('button[aria-label="打开侧边栏"]')`);
@@ -86,7 +90,8 @@ try {
await c.call('Input.dispatchKeyEvent',{type:'keyDown',key:'Escape',code:'Escape'});
await c.call('Input.dispatchKeyEvent',{type:'keyUp',key:'Escape',code:'Escape'});
await c.click(`document.querySelector('[contenteditable="true"]')`);
const prompt=liveModel ? '请分析当前任务的状态和异常,告诉我任务名称、现在进展到哪一步以及接下来可以做什么。不要修改工程。' : '请分析当前任务的异常,并说明允许的处理方式。';
const fileCheck=process.argv.includes('--file-check');
const prompt=liveModel ? (fileCheck?'请分析当前任务的附件:读取上传的 dsh-upload.txt,再解压 dsh-upload.zip 并读取其中说明.txt,分别告诉我这两份文本的完整内容和解压后的真实目录。不要修改原文件或运行 CAD。':'请分析当前任务的状态和异常,告诉我任务名称、现在进展到哪一步以及接下来可以做什么。不要修改工程。') : '请分析当前任务的异常,并说明允许的处理方式。';
report.prompt=prompt;
report.explicitToolNamesInPrompt=false;
await c.call('Input.insertText',{text:prompt});
@@ -96,8 +101,8 @@ try {
if(liveModel) {
await c.click(`document.querySelector('button[aria-label="发送消息"]')`);
const replies=`[...document.querySelectorAll('[data-chat-group-part="response"]')].map(e=>e.innerText).join('\\n')`;
await wait(`(${replies}).length>30 && /任务|状态/.test(${replies})`,100000);
await wait(`![...document.querySelectorAll('button[aria-label="停止生成"]')].some(e=>e.getBoundingClientRect().width>0)`,100000);
await wait(fileCheck?`(${replies}).includes('DSH_UPLOAD_CONTENT')&&(${replies}).includes('DSH_ZIP_UPLOAD_CONTENT')`:`(${replies}).length>30 && /任务|状态/.test(${replies})`,fileCheck?180000:100000);
await wait(`![...document.querySelectorAll('button[aria-label="停止生成"]')].some(e=>e.getBoundingClientRect().width>0)`,fileCheck?180000:100000);
report.reply=await c.evaluate(replies);
report.liveModelReplyTested=true;
report.liveTurnCompleted=true;