MCPcopy Create free account
hub / github.com/HisMax/RedInk / loadState

Function loadState

frontend/src/stores/generator.ts:86–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85// 从 localStorage 加载状态
86function loadState(): Partial<GeneratorState> {
87 try {
88 const saved = localStorage.getItem(STORAGE_KEY)
89 if (saved) {
90 return JSON.parse(saved)
91 }
92 } catch (e) {
93 console.error('加载状态失败:', e)
94 }
95 return {}
96}
97
98// 保存状态到 localStorage
99function saveState(state: GeneratorState) {

Callers 1

generator.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected