MCPcopy
hub / github.com/ResearAI/AutoFigure-Edit / saveImportState

Function saveImportState

web/app.js:1327–1345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1325 }
1326
1327 function saveImportState() {
1328 const state = {
1329 provider: normalizeProviderValue(providerInput?.value ?? "gemini"),
1330 svgModel: svgModelInput?.value ?? "",
1331 apiKey: apiKeyInput?.value ?? "",
1332 baseUrl: baseUrlInput?.value ?? DEFAULT_CUSTOM_BASE_URL,
1333 samBackend: samBackend?.value ?? "roboflow",
1334 samPrompt: samPrompt?.value ?? "icon,person,robot,animal",
1335 samApiKey: samApiKeyInput?.value ?? "",
1336 uploadedFigurePath,
1337 previewUrl: figurePreview?.src ?? "",
1338 figureStatus: figureStatus?.textContent ?? "",
1339 };
1340 try {
1341 window.sessionStorage.setItem(IMPORT_STATE_KEY, JSON.stringify(state));
1342 } catch (_err) {
1343 // Ignore storage failures.
1344 }
1345 }
1346
1347 function applyImportState() {
1348 const state = loadImportState();

Callers 3

syncProviderDefaultsFunction · 0.85
syncSamApiKeyVisibilityFunction · 0.85
initImportPageFunction · 0.85

Calls 1

normalizeProviderValueFunction · 0.85

Tested by

no test coverage detected