fix: add web project folder picker and isolated HTML file previews

This commit is contained in:
Agent Workbench Dev
2026-11-02 08:54:31 +08:00
parent bfd2f213a5
commit 70ac4c40b5
28 changed files with 515 additions and 20 deletions
+7
View File
@@ -40,6 +40,13 @@ export class DesktopBridge {
const error = await this.shell.openPath(project.root); if (error) throw desktopError('系统无法打开所属项目目录。');
return { opened: true, projectId: project.id, root: project.root };
}
if (action === 'openFilePreview') {
const access = await this.controller.api('/local-file-preview-access?url=' + encodeURIComponent(value.url));
if (!access.allowed || access.projectId !== value.projectId) throw desktopError('此预览已关闭或不属于当前项目。');
assertDesktopFrame(event, this.getWindow(), this.controller.url);
await this.shell.openExternal(value.url);
return { opened: true };
}
if (action === 'reviewTask') {
const session = await this.task(value); await this.project(value.projectId);
return { projectId: session.projectId, sessionId: session.id, taskId: value.taskId, eventSeq: session.eventSeq };