MCPcopy
hub / github.com/github/awesome-copilot / mutateState

Function mutateState

extensions/site-studio/extension.mjs:885–891  ·  view source on GitHub ↗
(mutator)

Source from the content-addressed store, hash-verified

883}
884
885async function mutateState(mutator) {
886 await loadState();
887 const result = await mutator(stateCache);
888 await persistState();
889 publishSse("state_update", stateCache);
890 return result;
891}
892
893function renderHtml(instanceId) {
894 return `<!doctype html>

Callers 2

handleApiFunction · 0.85
extension.mjsFile · 0.85

Calls 3

persistStateFunction · 0.85
publishSseFunction · 0.85
loadStateFunction · 0.70

Tested by

no test coverage detected