mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): Antigravity IDE & composer mount, modular preferences, session charts, and per-model context windows (v1.5.0)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import { Response, SidecarApp } from 'sidecar_sdk';
|
||||
import {
|
||||
bootWindowBridgeRuntime,
|
||||
executeAccountCredentialAction,
|
||||
executeCloudSyncAction,
|
||||
executeModelContextWindowAction,
|
||||
executePluginUpdateAction,
|
||||
@@ -101,6 +102,24 @@ app.api('/api/settings', (data, req) => {
|
||||
return out.updated;
|
||||
});
|
||||
|
||||
async function serveAccountCredentials(data, req) {
|
||||
if (!isLocalHostRequest(req)) {
|
||||
return new Response(JSON.stringify({ error: 'Forbidden host or origin' }), {
|
||||
status: 403,
|
||||
contentType: 'application/json',
|
||||
});
|
||||
}
|
||||
const out = await executeAccountCredentialAction(data);
|
||||
return new Response(out.body, {
|
||||
status: out.status,
|
||||
contentType: out.contentType,
|
||||
headers: out.headers,
|
||||
});
|
||||
}
|
||||
|
||||
app.api('/api/accounts', (_data, req) => serveAccountCredentials(undefined, req), 'GET');
|
||||
app.api('/api/accounts/update', serveAccountCredentials, 'POST');
|
||||
|
||||
app.api('/api/context-window', async (data, req) => {
|
||||
if (!isLocalHostRequest(req)) {
|
||||
return new Response(JSON.stringify({ error: 'Forbidden host or origin' }), {
|
||||
|
||||
Reference in New Issue
Block a user