MCPcopy Index your code
hub / github.com/anomalyco/opencode / setTheme

Function setTheme

packages/opencode/src/plugin/meta.ts:169–181  ·  view source on GitHub ↗
(id: string, name: string, theme: Theme)

Source from the content-addressed store, hash-verified

167}
168
169export async function setTheme(id: string, name: string, theme: Theme): Promise<void> {
170 const file = storePath()
171 await Flock.withLock(lock(file), async () => {
172 const store = await read(file)
173 const entry = store[id]
174 if (!entry) return
175 entry.themes = {
176 ...entry.themes,
177 [name]: theme,
178 }
179 await Filesystem.writeJson(file, store)
180 })
181}
182
183export async function list(): Promise<Store> {
184 const file = storePath()

Callers 1

Calls 3

storePathFunction · 0.85
lockFunction · 0.70
readFunction · 0.70

Tested by

no test coverage detected