(opts?: { image?: boolean })
| 822 | } |
| 823 | |
| 824 | function 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}) | ` : "" |
| 837 | return `\n\n${image}${shareUrl}[github run](${useEnvRunUrl()})` |
| 838 | } |
| 839 | |
| 840 | async function fetchRepo() { |
| 841 | const { repo } = useContext() |
no test coverage detected