MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / prependUserMessage

Method prependUserMessage

src/cli/structuredIO.ts:204–213  ·  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

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

Callers 2

runHeadlessFunction · 0.80
handleInitializeRequestFunction · 0.80

Calls 1

jsonStringifyFunction · 0.85

Tested by

no test coverage detected