MCPcopy Create free account
hub / github.com/anomalyco/opencode / setLoaded

Function setLoaded

packages/app/src/context/file.tsx:139–149  ·  view source on GitHub ↗
(file: string, content: FileState["content"])

Source from the content-addressed store, hash-verified

137 }
138
139 const setLoaded = (file: string, content: FileState["content"]) => {
140 setStore(
141 "file",
142 file,
143 produce((draft) => {
144 draft.loaded = true
145 draft.loading = false
146 draft.content = content
147 }),
148 )
149 }
150
151 const setLoadError = (file: string, message: string) => {
152 setStore(

Callers 3

loadFunction · 0.85
loadFunction · 0.85
clearAllFunction · 0.85

Calls 1

setStoreFunction · 0.85

Tested by

no test coverage detected