Skip to content

Commit 9f44214

Browse files
committed
feat: Update storage keys to include versioning for better data management and compatibility
1 parent 1694b5f commit 9f44214

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/renderer/src/utils/storage.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { AppState, Settings, Page, PageFolder } from '../types'
22

3+
// 应用版本号,用于存储键的版本控制
4+
const APP_VERSION = '1.0.0-preview.2'
5+
36
const STORAGE_KEYS = {
4-
APP_STATE: 'ai-chat-app-state',
5-
SETTINGS: 'ai-chat-app-settings',
6-
PAGES: 'ai-chat-app-pages',
7-
FOLDERS: 'ai-chat-app-folders'
7+
APP_STATE: `ai-chat-app-state-v${APP_VERSION}`,
8+
SETTINGS: `ai-chat-app-settings-v${APP_VERSION}`,
9+
PAGES: `ai-chat-app-pages-v${APP_VERSION}`,
10+
FOLDERS: `ai-chat-app-folders-v${APP_VERSION}`
811
} as const
912

1013
export class StorageService {

0 commit comments

Comments
 (0)