feat(companion): add task PWA and original execution controls

This commit is contained in:
Agent Workbench Dev
2026-10-31 17:53:15 +08:00
parent dfe2e40387
commit bc67e6e0a3
57 changed files with 1212 additions and 15 deletions
+5
View File
@@ -16,6 +16,11 @@ export async function exportSession(id: string) {
const blob = await response.blob();
downloadBlob(blob, 'agent-workbench-session-' + id + '.json');
}
export async function downloadCompanionCertificate() {
const response = await fetch('/api/companion/certificate', { headers: { 'X-Workbench-Token': accessToken } });
if (!response.ok) { const value = await response.json().catch(() => ({})); throw new Error(value.error || '手机根证书下载失败。'); }
downloadBlob(await response.blob(), 'Agent-Workbench-Mobile-CA.cer');
}
export async function downloadArtifact(sessionId: string, artifactId: string, name: string) {
const response = await fetch('/api/artifacts/' + artifactId + '?session=' + sessionId + '&download=1', { headers: { 'X-Workbench-Token': accessToken } });
if (!response.ok) {