MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / applyTurnState

Function applyTurnState

app/src/modules/renderer.js:251–261  ·  view source on GitHub ↗
(state, reason = '')

Source from the content-addressed store, hash-verified

249}
250
251export function applyTurnState(state, reason = '') {
252 if (!state) return;
253 const nextVersion = Number.isInteger(state.version) ? state.version : 0;
254 if (nextVersion < S.turnStateVersion) return;
255 S.turnStateVersion = nextVersion;
256 S.pendingTurnState = null;
257 const shouldWait = state.phase === 'running';
258 if (S.waiting !== shouldWait) {
259 setWaiting(shouldWait, reason || `turn_state:${state.phase || 'idle'}`);
260 }
261}
262
263// ---- Optimistic bubble ----
264export function finalizeOptimisticBubble() {

Callers 1

connectFunction · 0.90

Calls 1

setWaitingFunction · 0.90

Tested by

no test coverage detected