MCPcopy Index your code
hub / github.com/anomalyco/opencode / filePart

Function filePart

packages/opencode/test/cli/run/session.shared.test.ts:95–106  ·  view source on GitHub ↗
(id: string, messageID: string, url: string, input: Partial<FilePart> = {})

Source from the content-addressed store, hash-verified

93}
94
95function filePart(id: string, messageID: string, url: string, input: Partial<FilePart> = {}): FilePart {
96 return {
97 id,
98 sessionID: "session-1",
99 messageID,
100 type: "file",
101 mime: input.mime ?? "text/plain",
102 filename: input.filename,
103 url,
104 source: input.source,
105 }
106}
107
108describe("run session shared", () => {
109 test("builds user prompt text from text, file, and agent parts", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected