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

Function footer

github/index.ts:824–838  ·  view source on GitHub ↗
(opts?: { image?: boolean })

Source from the content-addressed store, hash-verified

822}
823
824function footer(opts?: { image?: boolean }) {
825 const { providerID, modelID } = useEnvModel()
826
827 const image = (() => {
828 if (!shareId) return ""
829 if (!opts?.image) return ""
830
831 const titleAlt = encodeURIComponent(session.title.substring(0, 50))
832 const title64 = Buffer.from(session.title.substring(0, 700), "utf8").toString("base64")
833
834 return `<a href="${useShareUrl()}/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`
835 })()
836 const shareUrl = shareId ? `[opencode session](${useShareUrl()}/s/${shareId})&nbsp;&nbsp;|&nbsp;&nbsp;` : ""
837 return `\n\n${image}${shareUrl}[github run](${useEnvRunUrl()})`
838}
839
840async function fetchRepo() {
841 const { repo } = useContext()

Callers 1

index.tsFile · 0.70

Calls 4

useEnvModelFunction · 0.85
useShareUrlFunction · 0.85
useEnvRunUrlFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected