refactor(settings): update RatioSetting component to use ModelPricingCombined and adjust tab structure
- Replaced ModelRatioSettings with ModelPricingCombined in the RatioSetting component. - Updated tab structure to prioritize pricing settings over model settings. - Removed unused imports for ModelRatioSettings and ModelSettingsVisualEditor.
This commit is contained in:
+13
@@ -42,6 +42,7 @@ export const useTokensData = (openFluentNotification, openCCSwitchModal) => {
|
||||
// Basic state
|
||||
const [tokens, setTokens] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [groupRatios, setGroupRatios] = useState({});
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
const [tokenCount, setTokenCount] = useState(0);
|
||||
const [pageSize, setPageSize] = useState(ITEMS_PER_PAGE);
|
||||
@@ -437,6 +438,17 @@ export const useTokensData = (openFluentNotification, openCCSwitchModal) => {
|
||||
.catch((reason) => {
|
||||
showError(reason);
|
||||
});
|
||||
API.get('/api/user/self/groups')
|
||||
.then((res) => {
|
||||
if (res.data.success && res.data.data) {
|
||||
const ratios = {};
|
||||
for (const [name, info] of Object.entries(res.data.data)) {
|
||||
ratios[name] = info.ratio;
|
||||
}
|
||||
setGroupRatios(ratios);
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}, [pageSize]);
|
||||
|
||||
return {
|
||||
@@ -447,6 +459,7 @@ export const useTokensData = (openFluentNotification, openCCSwitchModal) => {
|
||||
tokenCount,
|
||||
pageSize,
|
||||
searching,
|
||||
groupRatios,
|
||||
|
||||
// Selection state
|
||||
selectedKeys,
|
||||
|
||||
Reference in New Issue
Block a user