chore: show existing when add file

This commit is contained in:
jialin
2025-10-23 11:52:49 +08:00
parent cc0580301e
commit a815e71bfe
25 changed files with 256 additions and 97 deletions
@@ -547,6 +547,11 @@ const AddModal: React.FC<AddModalProps> = (props) => {
>
<FormWrapper>
<ColumnWrapper
styles={{
container: {
paddingTop: 0
}
}}
paddingBottom={
warningStatus.show
? Array.isArray(warningStatus.message)
+3 -3
View File
@@ -8,13 +8,13 @@ import '../style/gpu-card.less';
const CardWrapper = styled.div`
display: flex;
gap: 10px;
gap: 8px;
flex-direction: column;
align-items: flex-start;
justify-content: center;
width: 100%;
border-bottom: 1px solid var(--ant-color-split);
padding-bottom: 10px;
padding-bottom: 5px;
`;
const Header = styled.div`
@@ -25,7 +25,7 @@ const Description = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
gap: 8px;
color: var(--ant-color-text-tertiary);
`;
+16 -4
View File
@@ -10,6 +10,7 @@ import React, { useMemo } from 'react';
import styled from 'styled-components';
import { modelCategories, modelCategoriesMap, modelSourceMap } from '../config';
import { categoryToPathMap } from '../config/button-actions';
import { categoryConfig } from './model-tag';
const MyModelsStatusValueMap = {
Inactive: 'Inactive',
@@ -198,10 +199,21 @@ const ModelItem: React.FC<{
<div className="content">
<div className="footer">
<div className="extra-info">
<ThemeTag className="tag-item" color="blue">
{_.find(modelCategories, { value: model.categories?.[0] })
?.label || model.categories?.[0]}
</ThemeTag>
{model.categories?.length > 0 &&
model.categories.map((sItem: string) => {
return (
<ThemeTag
icon={categoryConfig[sItem]?.icon}
key={sItem}
className="tag-item"
color={categoryConfig[sItem]?.color || 'blue'}
opacity={0.7}
>
{_.find(modelCategories, { value: sItem })?.label ||
sItem}
</ThemeTag>
);
})}
{maxToken > 0 && (
<ThemeTag className="tag-item" color="purple">
{maxToken}K context
+1 -1
View File
@@ -7,7 +7,7 @@ import {
import { Tag } from 'antd';
import { modelCategoriesMap } from '../config';
const categoryConfig = {
export const categoryConfig = {
[modelCategoriesMap.reranker]: {
icon: <IconFont type="icon-rank1" />,
color: 'cyan',