mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-23 04:09:49 +00:00
feat(antigravity): integrate Antigravity tool with MITM support and update CLI tools
This commit is contained in:
@@ -44,6 +44,7 @@ const defaultData = {
|
||||
providerConnections: [],
|
||||
providerNodes: [],
|
||||
modelAliases: {},
|
||||
mitmAlias: {},
|
||||
combos: [],
|
||||
apiKeys: [],
|
||||
settings: {
|
||||
@@ -59,6 +60,7 @@ function cloneDefaultData() {
|
||||
providerConnections: [],
|
||||
providerNodes: [],
|
||||
modelAliases: {},
|
||||
mitmAlias: {},
|
||||
combos: [],
|
||||
apiKeys: [],
|
||||
settings: {
|
||||
@@ -495,6 +497,22 @@ export async function deleteModelAlias(alias) {
|
||||
await db.write();
|
||||
}
|
||||
|
||||
// ============ MITM Alias ============
|
||||
|
||||
export async function getMitmAlias(toolName) {
|
||||
const db = await getDb();
|
||||
const all = db.data.mitmAlias || {};
|
||||
if (toolName) return all[toolName] || {};
|
||||
return all;
|
||||
}
|
||||
|
||||
export async function setMitmAliasAll(toolName, mappings) {
|
||||
const db = await getDb();
|
||||
if (!db.data.mitmAlias) db.data.mitmAlias = {};
|
||||
db.data.mitmAlias[toolName] = mappings || {};
|
||||
await db.write();
|
||||
}
|
||||
|
||||
// ============ Combos ============
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user