✨ feat(ui): Enhance model tag rendering in logs table with icons
Improve the logs table by implementing brand-specific model icons and better redirection visualization: - Replace standard tags with `renderModelTag` to display appropriate brand icons for each model (OpenAI, Claude, Gemini, etc.) - Fix background colors by explicitly passing color parameters - Restore descriptive text for model redirection in popover - Replace refresh icon with forward icon for better representation of model redirection - Clean up unused imports This change provides a more intuitive visual representation of models and their relationships, making the logs table easier to understand at a glance.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useContext, useEffect, useRef, useMemo, useState } from 'react';
|
||||
import { API, copy, showError, showInfo, showSuccess } from '../../helpers/index.js';
|
||||
import { API, copy, showError, showInfo, showSuccess, getModelCategories } from '../../helpers/index.js';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import {
|
||||
@@ -28,7 +28,6 @@ import {
|
||||
} from '@douyinfe/semi-icons';
|
||||
import { UserContext } from '../../context/User/index.js';
|
||||
import { AlertCircle } from 'lucide-react';
|
||||
import { MODEL_CATEGORIES } from '../../constants/index.js';
|
||||
|
||||
const ModelPricing = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -321,7 +320,7 @@ const ModelPricing = () => {
|
||||
refresh().then();
|
||||
}, []);
|
||||
|
||||
const modelCategories = MODEL_CATEGORIES(t);
|
||||
const modelCategories = getModelCategories(t);
|
||||
|
||||
const renderArrow = (items, pos, handleArrowClick) => {
|
||||
const style = {
|
||||
|
||||
Reference in New Issue
Block a user