MCPcopy Create free account
hub / github.com/winfunc/opcode / migrateFromOldFormat

Method migrateFromOldFormat

src/services/tabPersistence.ts:185–199  ·  view source on GitHub ↗

* Migrate from old storage format if needed

()

Source from the content-addressed store, hash-verified

183 * Migrate from old storage format if needed
184 */
185 static migrateFromOldFormat(): void {
186 try {
187 const oldKey = 'opcode_tabs';
188 const oldData = localStorage.getItem(oldKey);
189
190 if (oldData && !localStorage.getItem(STORAGE_KEY)) {
191 // Attempt to migrate old data
192 localStorage.setItem(STORAGE_KEY, oldData);
193 localStorage.removeItem(oldKey);
194 console.log('Migrated tab data from old format');
195 }
196 } catch (error) {
197 console.error('Failed to migrate old tab data:', error);
198 }
199 }
200}

Callers 1

loadTabsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected