feat(companion): add task PWA and original execution controls
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user