fix playground (#2153)

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

View File

@@ -20,7 +20,13 @@ For commercial licensing, please contact support@quantumnous.com
import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { Modal } from '@douyinfe/semi-ui';
import { API, copy, showError, showSuccess } from '../../helpers';
import {
API,
copy,
showError,
showSuccess,
encodeToBase64,
} from '../../helpers';
import { ITEMS_PER_PAGE } from '../../constants';
import { useTableCompactMode } from '../common/useTableCompactMode';
@@ -136,7 +142,7 @@ export const useTokensData = (openFluentNotification) => {
apiKey: 'sk-' + record.key,
};
let encodedConfig = encodeURIComponent(
btoa(JSON.stringify(cherryConfig)),
encodeToBase64(JSON.stringify(cherryConfig)),
);
url = url.replaceAll('{cherryConfig}', encodedConfig);
} else {