MCPcopy
hub / github.com/coder/mux / seedImageMessage

Function seedImageMessage

src/node/services/agentSession.editMessageId.test.ts:69–82  ·  view source on GitHub ↗
(
    workspaceId: string,
    historyService: Awaited<ReturnType<typeof createTestHistoryService>>["historyService"],
    messageId = "user-message-with-image"
  )

Source from the content-addressed store, hash-verified

67 }
68
69 async function seedImageMessage(
70 workspaceId: string,
71 historyService: Awaited<ReturnType<typeof createTestHistoryService>>["historyService"],
72 messageId = "user-message-with-image"
73 ): Promise<string> {
74 const originalImageUrl = "data:image/png;base64,AAAA";
75 await historyService.appendToHistory(
76 workspaceId,
77 createMuxMessage(messageId, "user", "original", { historySequence: 0 }, [
78 { type: "file", mediaType: "image/png", url: originalImageUrl },
79 ])
80 );
81 return originalImageUrl;
82 }
83
84 afterEach(async () => {
85 await historyCleanup?.();

Calls 2

createMuxMessageFunction · 0.90
appendToHistoryMethod · 0.80

Tested by

no test coverage detected