MCPcopy
hub / github.com/anomalyco/opencode / part

Function part

packages/opencode/test/image/image.test.ts:18–27  ·  view source on GitHub ↗
(mime: string, data: string)

Source from the content-addressed store, hash-verified

16)
17
18function part(mime: string, data: string) {
19 return {
20 id: PartID.ascending(),
21 messageID: MessageID.ascending(),
22 sessionID: SessionID.make("ses_test"),
23 type: "file" as const,
24 mime,
25 url: `data:${mime};base64,${data}`,
26 }
27}
28
29describe("Image", () => {
30 it.effect("normalizes generated png and jpeg attachments", () =>

Callers 1

image.test.tsFile · 0.70

Calls 1

makeMethod · 0.45

Tested by

no test coverage detected