MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / pushMessageInPlace

Method pushMessageInPlace

packages/angular/src/lib/agent.spec.ts:88–97  ·  view source on GitHub ↗

Mirrors AbstractAgent.addMessage: mutate the messages array in place and * notify with the SAME array reference (no reassignment).

(message: Message)

Source from the content-addressed store, hash-verified

86 /** Mirrors AbstractAgent.addMessage: mutate the messages array in place and
87 * notify with the SAME array reference (no reassignment). */
88 pushMessageInPlace(message: Message) {
89 this.messages.push(message);
90 for (const s of this.subscribers) {
91 s.onMessagesChanged?.({
92 messages: this.messages,
93 state: this.state,
94 agent: this,
95 });
96 }
97 }
98
99 emitState(state: State) {
100 this.state = state;

Callers 1

agent.spec.tsFile · 0.80

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected