MCPcopy
hub / github.com/continuedev/continue / setState

Function setState

extensions/cli/src/services/BaseService.test.ts:67–75  ·  view source on GitHub ↗

* Update service state and emit change event

(newState: Partial<TState>)

Source from the content-addressed store, hash-verified

65 * Update service state and emit change event
66 */
67 protected setState(newState: Partial<TState>): void {
68 const previousState = this.currentState;
69 this.currentState = { ...this.currentState, ...newState };
70 // Only log state updates if not in production to avoid circular reference issues
71 if (process.env.NODE_ENV !== "production") {
72 logger.debug(`${this.serviceName} state updated`);
73 }
74 this.emit("stateChanged", this.currentState, previousState);
75 }
76
77 /**
78 * Check if service is ready for use

Callers

nothing calls this directly

Calls 2

emitMethod · 0.65
debugMethod · 0.45

Tested by

no test coverage detected