style(web): set default knowledge icon (#1244)

This commit is contained in:
Hzh_97 2024-03-04 14:25:29 +08:00 committed by GitHub
parent 54ba663646
commit 7a38edcaed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 18 additions and 957 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
self.__BUILD_MANIFEST=function(s,c,a,e,t,n,d,b,k,f,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,a,e,f,d,b,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-91ccbb17a10c967b.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,f,n,"static/chunks/pages/agent-eca3b37b625d18b7.js"],"/app":[h,s,c,a,e,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-965a0a3b7d3520ce.js"],"/chat":["static/chunks/pages/chat-b0e377e00ee18a5b.js"],"/database":[s,c,a,e,t,n,b,k,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-107b1b057ad44146.js"],"/flow":[h,s,c,a,i,u,j,"static/chunks/pages/flow-af8106c2d4339aca.js"],"/flow/canvas":[p,h,s,c,a,e,d,b,i,k,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-57121d2cb2bfbe1c.js"],"/knowledge":[l,s,c,a,t,f,n,b,k,r,g,"static/chunks/8660-13b381e809ea1aa1.js","static/chunks/pages/knowledge-e6ddca71418d06d7.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-bc057a5c02a2c123.js"],"/models":[l,s,c,a,e,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-4a50fb0ade28ee60.js"],"/prompt":[s,c,a,e,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-a25dc012271e1f81.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.js","static/chunks/4442-2fd5fdaab894a502.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/4810-1e930464030aee69.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-5a62c446efb06d63.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-24749b0b156943d8.js","static/chunks/6485-a0f49ba464882399.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/8548-e633dfc38edeb044.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
self.__BUILD_MANIFEST=function(s,c,a,e,t,n,d,b,f,k,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,a,e,k,d,b,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-91ccbb17a10c967b.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,k,n,"static/chunks/pages/agent-eca3b37b625d18b7.js"],"/app":[h,s,c,a,e,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-965a0a3b7d3520ce.js"],"/chat":["static/chunks/pages/chat-b0e377e00ee18a5b.js"],"/database":[s,c,a,e,t,n,b,f,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-107b1b057ad44146.js"],"/flow":[h,s,c,a,i,u,j,"static/chunks/pages/flow-af8106c2d4339aca.js"],"/flow/canvas":[p,h,s,c,a,e,d,b,i,f,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-57121d2cb2bfbe1c.js"],"/knowledge":[l,s,c,a,t,k,n,b,f,r,g,"static/chunks/8660-13b381e809ea1aa1.js","static/chunks/pages/knowledge-4e10990f85629201.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-bc057a5c02a2c123.js"],"/models":[l,s,c,a,e,f,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-4a50fb0ade28ee60.js"],"/prompt":[s,c,a,e,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-a25dc012271e1f81.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.js","static/chunks/4442-2fd5fdaab894a502.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/4810-1e930464030aee69.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-5a62c446efb06d63.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-24749b0b156943d8.js","static/chunks/6485-a0f49ba464882399.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/8548-e633dfc38edeb044.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,6 @@ import DocPanel from './doc-panel';
import moment from 'moment';
import { apiInterceptors, delSpace, newDialogue } from '@/client/api';
import { useTranslation } from 'react-i18next';
import { VECTOR_ICON_MAP } from '@/utils/constants';
import GptCard from '../common/gpt-card';
interface IProps {
@ -53,17 +52,6 @@ export default function SpaceCard(props: IProps) {
}
};
const renderVectorIcon = (type: string) => {
return (
<Image
className="rounded-full w-8 h-8 border border-gray-200 object-contain bg-white inline-block"
width={36}
height={136}
src={VECTOR_ICON_MAP[type] || '/models/knowledge-default.jpg'}
alt="llm"
/>
);
};
return (
<ConfigProvider
theme={{
@ -84,7 +72,7 @@ export default function SpaceCard(props: IProps) {
<GptCard
title={space.name}
desc={space.desc}
icon={VECTOR_ICON_MAP[space.vector_type] || '/LOGO_SMALL.png'}
icon="/models/knowledge-default.jpg"
iconBorder={false}
tags={[
{

View File

@ -9,8 +9,6 @@ import Link from 'next/link';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
type FormFields = Pick<IFlow, 'label' | 'name'>;
function Flow() {
const { t } = useTranslation();

View File

@ -38,10 +38,6 @@ export const MODEL_ICON_MAP: Record<ModelType, { label: string; icon: string }>
'solar-10.7b-instruct-v1.0': { label: 'solar-10.7b-instruct-v1.0', icon: '/models/solar_logo.png' },
};
export const VECTOR_ICON_MAP: Record<string, string> = {
Chroma: '/models/chroma-logo.png',
};
export const dbMapper: Record<DBType, { label: string; icon: string; desc: string }> = {
mysql: { label: 'MySQL', icon: '/icons/mysql.png', desc: 'Fast, reliable, scalable open-source relational database management system.' },
mssql: { label: 'MSSQL', icon: '/icons/mssql.png', desc: 'Powerful, scalable, secure relational database system by Microsoft.' },