MCPcopy Create free account
hub / github.com/anomalyco/opencode / footer

Function footer

packages/opencode/src/cli/cmd/github.handler.ts:1345–1357  ·  view source on GitHub ↗
(opts?: { image?: boolean })

Source from the content-addressed store, hash-verified

1343 }
1344
1345 function footer(opts?: { image?: boolean }) {
1346 const image = (() => {
1347 if (!shareId) return ""
1348 if (!opts?.image) return ""
1349
1350 const titleAlt = encodeURIComponent(session.title.substring(0, 50))
1351 const title64 = Buffer.from(session.title.substring(0, 700), "utf8").toString("base64")
1352
1353 return `<a href="${shareBaseUrl}/s/${shareId}"><img width="200" alt="${titleAlt}" src="https://social-cards.sst.dev/opencode-share/${title64}.png?model=${providerID}/${modelID}&version=${session.version}&id=${shareId}" /></a>\n`
1354 })()
1355 const shareUrl = shareId ? `[opencode session](${shareBaseUrl}/s/${shareId})&nbsp;&nbsp;|&nbsp;&nbsp;` : ""
1356 return `\n\n${image}${shareUrl}[github run](${runUrl})`
1357 }
1358
1359 async function fetchRepo() {
1360 return await octoRest.rest.repos.get({ owner, repo })

Callers 2

github.handler.tsFile · 0.70
RunFooterSubagentBodyFunction · 0.50

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected