MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / downloadAntigravityCred

Function downloadAntigravityCred

front/common.js:1483–1496  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

1481}
1482function batchAntigravityAction(action) { AppState.antigravityCreds.batchAction(action); }
1483function downloadAntigravityCred(filename) {
1484 fetch(`./creds/download/${filename}?mode=antigravity`, { headers: getAuthHeaders() })
1485 .then(r => r.ok ? r.blob() : Promise.reject())
1486 .then(blob => {
1487 const url = window.URL.createObjectURL(blob);
1488 const a = document.createElement('a');
1489 a.href = url;
1490 a.download = filename;
1491 a.click();
1492 window.URL.revokeObjectURL(url);
1493 showStatus(`✅ 已下载: ${filename}`, 'success');
1494 })
1495 .catch(() => showStatus(`下载失败: ${filename}`, 'error'));
1496}
1497function deleteAntigravityCred(filename) {
1498 if (confirm(`确定要删除 ${filename} 吗?`)) {
1499 AppState.antigravityCreds.action(filename, 'delete');

Callers

nothing calls this directly

Calls 2

getAuthHeadersFunction · 0.85
showStatusFunction · 0.85

Tested by

no test coverage detected