MCPcopy
hub / github.com/QLHazyCoder/FlowPilot / setState

Function setState

background.js:908–923  ·  view source on GitHub ↗
(updates)

Source from the content-addressed store, hash-verified

906}
907
908async function setState(updates) {
909 console.log(LOG_PREFIX, 'storage.set:', JSON.stringify(updates).slice(0, 200));
910 if (Object.keys(updates || {}).length > 0) {
911 await chrome.storage.session.set(updates);
912 const persistentAliasUpdates = {};
913 if (Object.prototype.hasOwnProperty.call(updates, 'manualAliasUsage')) {
914 persistentAliasUpdates.manualAliasUsage = normalizeBooleanMap(updates.manualAliasUsage);
915 }
916 if (Object.prototype.hasOwnProperty.call(updates, 'preservedAliases')) {
917 persistentAliasUpdates.preservedAliases = normalizeBooleanMap(updates.preservedAliases);
918 }
919 if (Object.keys(persistentAliasUpdates).length > 0) {
920 await chrome.storage.local.set(persistentAliasUpdates);
921 }
922 }
923}
924
925async function setPersistentSettings(updates) {
926 const persistedUpdates = buildPersistentSettingsPayload(updates);

Callers 15

importSettingsBundleFunction · 0.85
setEmailStateSilentlyFunction · 0.85
setPasswordStateFunction · 0.85
setLuckmailPurchaseStateFunction · 0.85
setIcloudAliasUsedStateFunction · 0.85
syncHotmailAccountsFunction · 0.85
deleteHotmailAccountFunction · 0.85

Calls 1

normalizeBooleanMapFunction · 0.85

Tested by

no test coverage detected