fix playground (#2153)

This commit is contained in:
Seefs
2025-11-06 20:18:00 +08:00
committed by GitHub
parent 736f7b55b7
commit fb610e62a0
4 changed files with 67 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ import {
createLoadingAssistantMessage,
getTextContent,
buildApiPayload,
encodeToBase64,
} from '../../helpers';
// Components
@@ -72,7 +73,7 @@ const generateAvatarDataUrl = (username) => {
<text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-size="16" fill="#ffffff" font-family="sans-serif">${firstLetter}</text>
</svg>
`;
return `data:image/svg+xml;base64,${btoa(svg)}`;
return `data:image/svg+xml;base64,${encodeToBase64(svg)}`;
};
const Playground = () => {