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

Function createInitialMessage

src/session/replInitialMessageDispatch.test.ts:10–31  ·  view source on GitHub ↗
(
  overrides: Partial<ReplInitialMessage> & {
    content?: string
    planContent?: string
  } = {},
)

Source from the content-addressed store, hash-verified

8} from './replInitialMessageDispatch.js'
9
10function createInitialMessage(
11 overrides: Partial<ReplInitialMessage> & {
12 content?: string
13 planContent?: string
14 } = {},
15): ReplInitialMessage {
16 const {
17 content = 'hello world',
18 planContent,
19 ...rest
20 } = overrides
21
22 return {
23 message: {
24 ...createUserMessage({
25 content,
26 }),
27 ...(planContent ? { planContent } : {}),
28 },
29 ...rest,
30 }
31}
32
33describe('dispatchReplInitialMessage', () => {
34 test('preserves clear-context ordering and plan-message direct-query routing', async () => {

Calls 1

createUserMessageFunction · 0.70

Tested by

no test coverage detected