MCPcopy Index your code
hub / github.com/github/awesome-copilot / pushState

Function pushState

extensions/java-modernization-studio/server.mjs:66–76  ·  view source on GitHub ↗
(rec, log, opts)

Source from the content-addressed store, hash-verified

64
65/** Re-scan the repo and push the fresh snapshot to connected clients. */
66export async function pushState(rec, log, opts) {
67 let state;
68 try {
69 state = await buildState(rec, opts);
70 } catch (e) {
71 if (log) log("appmod-cockpit scan failed: " + e.message, { level: "error" });
72 return null;
73 }
74 broadcast(rec, { type: "state", state });
75 return state;
76}
77
78/** Clamp a requested step budget into a sane range. */
79function clampSteps(n) {

Callers 4

extension.mjsFile · 0.90
cockpit.test.mjsFile · 0.90
startAutopilotFunction · 0.85
dispatchActionFunction · 0.85

Calls 3

logFunction · 0.85
buildStateFunction · 0.70
broadcastFunction · 0.70

Tested by

no test coverage detected