MCPcopy Create free account
hub / github.com/Noumena-Network/code / prependUserMessage

Method prependUserMessage

src/cli/structuredIO.ts:205–214  ·  view source on GitHub ↗

* Queue a user turn to be yielded before the next message from this.input. * Works before iteration starts and mid-stream — read() re-checks * prependedLines between each yielded message.

(content: string)

Source from the content-addressed store, hash-verified

203 * prependedLines between each yielded message.
204 */
205 prependUserMessage(content: string): void {
206 this.prependedLines.push(
207 jsonStringify({
208 type: 'user',
209 session_id: '',
210 message: { role: 'user', content },
211 parent_tool_use_id: null,
212 } satisfies SDKUserMessage) + '\n',
213 )
214 }
215
216 private async *read() {
217 let content = ''

Callers 2

runHeadlessFunction · 0.80
handleInitializeRequestFunction · 0.80

Calls 1

jsonStringifyFunction · 0.85

Tested by

no test coverage detected