From 9aa829e6fcae169c59bb59377ff67acc3d3866f8 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Wed, 5 Feb 2025 20:00:18 +0800 Subject: [PATCH] feat: Enhance model tags and icons with new reasoning and visual styles --- .../src/assets/fonts/icon-fonts/iconfont.css | 55 ++++++++++-------- .../assets/fonts/icon-fonts/iconfont.woff2 | Bin 3768 -> 4196 bytes .../src/components/Icons/ReasoningIcon.tsx | 24 ++++++++ .../src/components/Icons/VisionIcon.tsx | 20 +++++-- .../src/components/Icons/WebSearchIcon.tsx | 16 ++++- src/renderer/src/components/ModelTags.tsx | 35 ++++++----- .../components/Popups/SelectModelPopup.tsx | 17 ++++-- src/renderer/src/i18n/locales/ja-jp.json | 12 ++-- src/renderer/src/i18n/locales/ru-ru.json | 10 ++-- src/renderer/src/i18n/locales/zh-cn.json | 12 ++-- src/renderer/src/i18n/locales/zh-tw.json | 12 ++-- .../home/Inputbar/MentionModelsButton.tsx | 13 ++++- .../home/components/SelectModelButton.tsx | 2 +- .../ProviderSettings/EditModelsPopup.tsx | 5 +- .../ProviderSettings/ProviderSetting.tsx | 15 ++++- src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/migrate.ts | 1 - 17 files changed, 163 insertions(+), 88 deletions(-) create mode 100644 src/renderer/src/components/Icons/ReasoningIcon.tsx diff --git a/src/renderer/src/assets/fonts/icon-fonts/iconfont.css b/src/renderer/src/assets/fonts/icon-fonts/iconfont.css index c49c6ae6..d1512cd6 100644 --- a/src/renderer/src/assets/fonts/icon-fonts/iconfont.css +++ b/src/renderer/src/assets/fonts/icon-fonts/iconfont.css @@ -1,91 +1,96 @@ @font-face { - font-family: "iconfont"; /* Project id 4753420 */ - src: url('iconfont.woff2?t=1736309723926') format('woff2'), - url('iconfont.woff?t=1736309723926') format('woff'), - url('iconfont.ttf?t=1736309723926') format('truetype'); + font-family: 'iconfont'; /* Project id 4753420 */ + src: url('iconfont.woff2?t=1738750230250') format('woff2'); } .iconfont { - font-family: "iconfont" !important; + font-family: 'iconfont' !important; font-size: 16px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-thinking:before { + content: '\e65b'; +} + .icon-at:before { - content: "\e623"; + content: '\e623'; } .icon-icon-adaptive-width:before { - content: "\e87a"; + content: '\e87a'; +} + +.icon-at1:before { + content: '\e630'; } .icon-a-darkmode:before { - content: "\e6cd"; + content: '\e6cd'; } .icon-ai-model:before { - content: "\e827"; + content: '\e827'; } .icon-ai-model1:before { - content: "\ec09"; + content: '\ec09'; } .icon-gridlines:before { - content: "\e942"; + content: '\e942'; } .icon-inbox:before { - content: "\e869"; + content: '\e869'; } .icon-business-smart-assistant:before { - content: "\e601"; + content: '\e601'; } .icon-copy:before { - content: "\e6ae"; + content: '\e6ae'; } .icon-ic_send:before { - content: "\e795"; + content: '\e795'; } .icon-dark1:before { - content: "\e72f"; + content: '\e72f'; } .icon-theme-light:before { - content: "\e6b7"; + content: '\e6b7'; } .icon-translate_line:before { - content: "\e7de"; + content: '\e7de'; } .icon-history:before { - content: "\e758"; + content: '\e758'; } .icon-hide-sidebar:before { - content: "\e8eb"; + content: '\e8eb'; } .icon-show-sidebar:before { - content: "\e944"; + content: '\e944'; } .icon-appstore:before { - content: "\e792"; + content: '\e792'; } .icon-chat:before { - content: "\e615"; + content: '\e615'; } .icon-setting:before { - content: "\e78e"; + content: '\e78e'; } - diff --git a/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 b/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 index 5eee38b818ad3d45ff2cefdb20bfd00379b042c6..a059cc70888d8b439f0f71681f2f91a9720028ba 100644 GIT binary patch literal 4196 zcmV-q5S#CJPew8T0RR9101#vV3jhEB03Hwk01y=b0RR9100000000000000000000 z0000SR0d!GhA0ZDXrfmEHUcCASPL!y1Rw>3X9t2J8;uz=qxO@uQbqP(Cvam3{tdM% zlqeWIX{}T5y*3(KVWa7yo!D}I)Cl8$lCSWRcDfAJ6V-CeP)c|pJ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#>y^PRg|5h z%_&l^F4iCshTP!p9FeuEpw(4faXa1%f$b?(Nl8_$ z1l6~CW5oOq8jFgA8f^2p_al0f>EdiB>#eu4toL8UXN@M$qY*Bprx%6lNC#Y;*6A|q z`R7E(#i>Kqk7-8`UV~-_J^raG5;?NN#dQ6O7=iR`{2%Z#SGy>$eCUe#{po0q&rPY8 zmDB&T=ufKcP7Z%+aJ-%?gX%|9RlqjBEr~|vLi4gWgIV`)kWqQgpsxVR0#6@L_w}e} zzdv1Y2H56THD@5mD^yJ6B~|lUj$Y3zY1qfIF8V@V-G*!DZWs_uh+M<6=g13P@AC?6 zA21>M7iL8N&MO)A7t4tLpI3J;mM*SgInS=(;)E>!*q%IC!%A}4M+6~*WX4;VnNnfdpg)B(ID6sXM>r06m zV~{5W{gEn2VJTB!Kya)h7FKZWw0WmJ`W?sMEY#@-V?0viC`CCcQH|Q~mdlT3w4xoI z=*C*C$3|?%mhlI?v0rX80S$p|ACrOAY~~@+5bM@!oCTXWt3 diff --git a/src/renderer/src/components/Icons/ReasoningIcon.tsx b/src/renderer/src/components/Icons/ReasoningIcon.tsx new file mode 100644 index 00000000..92b86588 --- /dev/null +++ b/src/renderer/src/components/Icons/ReasoningIcon.tsx @@ -0,0 +1,24 @@ +import React, { FC } from 'react' +import styled from 'styled-components' + +const ReasoningIcon: FC, HTMLElement>> = (props) => { + return ( + + + + ) +} + +const Container = styled.div` + display: flex; + justify-content: center; + align-items: center; +` + +const Icon = styled.i` + color: var(--color-link); + font-size: 16px; + margin-right: 6px; +` + +export default ReasoningIcon diff --git a/src/renderer/src/components/Icons/VisionIcon.tsx b/src/renderer/src/components/Icons/VisionIcon.tsx index 6be4a087..df678bbf 100644 --- a/src/renderer/src/components/Icons/VisionIcon.tsx +++ b/src/renderer/src/components/Icons/VisionIcon.tsx @@ -1,15 +1,25 @@ -import { EyeOutlined } from '@ant-design/icons' +import { PictureOutlined } from '@ant-design/icons' import React, { FC } from 'react' import styled from 'styled-components' const VisionIcon: FC, HTMLElement>> = (props) => { - return + return ( + + + + ) } -const Icon = styled(EyeOutlined)` +const Container = styled.div` + display: flex; + justify-content: center; + align-items: center; +` + +const Icon = styled(PictureOutlined)` color: var(--color-primary); - font-size: 14px; - margin-left: 4px; + font-size: 15px; + margin-right: 6px; ` export default VisionIcon diff --git a/src/renderer/src/components/Icons/WebSearchIcon.tsx b/src/renderer/src/components/Icons/WebSearchIcon.tsx index 42ab971e..41bc4334 100644 --- a/src/renderer/src/components/Icons/WebSearchIcon.tsx +++ b/src/renderer/src/components/Icons/WebSearchIcon.tsx @@ -3,13 +3,23 @@ import React, { FC } from 'react' import styled from 'styled-components' const WebSearchIcon: FC, HTMLElement>> = (props) => { - return + return ( + + + + ) } +const Container = styled.div` + display: flex; + justify-content: center; + align-items: center; +` + const Icon = styled(GlobalOutlined)` color: var(--color-link); - font-size: 12px; - margin-left: 4px; + font-size: 15px; + margin-right: 6px; ` export default WebSearchIcon diff --git a/src/renderer/src/components/ModelTags.tsx b/src/renderer/src/components/ModelTags.tsx index c4a25ab4..463e8697 100644 --- a/src/renderer/src/components/ModelTags.tsx +++ b/src/renderer/src/components/ModelTags.tsx @@ -4,38 +4,37 @@ import { isFreeModel } from '@renderer/utils' import { Tag } from 'antd' import { FC } from 'react' import { useTranslation } from 'react-i18next' +import styled from 'styled-components' +import ReasoningIcon from './Icons/ReasoningIcon' import VisionIcon from './Icons/VisionIcon' import WebSearchIcon from './Icons/WebSearchIcon' interface ModelTagsProps { model: Model showFree?: boolean + showReasoning?: boolean } -const ModelTags: FC = ({ model, showFree = true }) => { +const ModelTags: FC = ({ model, showFree = true, showReasoning = true }) => { const { t } = useTranslation() return ( - <> + {isVisionModel(model) && } {isWebSearchModel(model) && } - {showFree && isFreeModel(model) && ( - - {t('models.free')} - - )} - {isEmbeddingModel(model) && ( - - {t('models.embedding')} - - )} - {isReasoningModel(model) && ( - - {t('models.reasoning')} - - )} - + {showReasoning && isReasoningModel(model) && } + {isEmbeddingModel(model) && {t('models.embedding')}} + {showFree && isFreeModel(model) && {t('models.free')}} + ) } +const Container = styled.div` + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: 2px; +` + export default ModelTags diff --git a/src/renderer/src/components/Popups/SelectModelPopup.tsx b/src/renderer/src/components/Popups/SelectModelPopup.tsx index 7fbe9466..01534c67 100644 --- a/src/renderer/src/components/Popups/SelectModelPopup.tsx +++ b/src/renderer/src/components/Popups/SelectModelPopup.tsx @@ -74,9 +74,9 @@ const PopupContainer: React.FC = ({ model, resolve }) => { key: getModelUniqId(m), label: ( - - {m?.name} - + + {m?.name} + { e.stopPropagation() @@ -118,7 +118,9 @@ const PopupContainer: React.FC = ({ model, resolve }) => { key: getModelUniqId(m) + '_pinned', label: ( - {m?.name} + + {m?.name} + { e.stopPropagation() @@ -277,6 +279,13 @@ const ModelItem = styled.div` width: 100%; ` +const ModelNameRow = styled.div` + display: flex; + flex-direction: row; + align-items: center; + gap: 8px; +` + const EmptyState = styled.div` display: flex; justify-content: center; diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json index ee0fcaba..ab51d583 100644 --- a/src/renderer/src/i18n/locales/ja-jp.json +++ b/src/renderer/src/i18n/locales/ja-jp.json @@ -629,12 +629,12 @@ "reasoning": "推論" }, "all": "すべて", - "vision": "画像モデル", - "websearch": "ウェブ検索モデル", - "free": "無料モデル", - "reasoning": "推論モデル", - "embedding": "埋め込みモデル", - "embedding_model": "埋め込みモデル", + "vision": "画像", + "websearch": "ウェブ検索", + "free": "無料", + "reasoning": "推論", + "embedding": "埋め込み", + "embedding_model": "埋め込み模型", "embedding_model_tooltip": "設定->モデルサービス->管理で追加", "dimensions": "{{dimensions}} 次元", "custom_parameters": "カスタムパラメータ", diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index 9bd79e56..4b8e4e88 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -641,11 +641,11 @@ "reasoning": "Рассуждение" }, "all": "Все", - "vision": "Визуальные модели", - "websearch": "Веб-поисковые модели", - "free": "Бесплатные модели", - "reasoning": "Модели рассуждения", - "embedding": "Встраиваемые модели", + "vision": "Визуальные", + "websearch": "Веб-поисковые", + "free": "Бесплатные", + "reasoning": "Рассуждение", + "embedding": "Встраиваемые", "embedding_model": "Встраиваемые модели", "embedding_model_tooltip": "Добавьте в настройки->модель сервиса->управление", "dimensions": "{{dimensions}} мер", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index b3e74af9..36a53a3e 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -494,7 +494,7 @@ "delete.title": "删除提供商", "docs_check": "查看", "docs_more_details": "获取更多详情", - "get_api_key": "获取密钥", + "get_api_key": "点击这里获取密钥", "no_models": "请先添加模型再检查 API 连接", "not_checked": "未检查", "remove_duplicate_keys": "移除重复密钥", @@ -636,11 +636,11 @@ "reasoning": "推理" }, "all": "全部", - "vision": "视觉模型", - "websearch": "联网模型", - "free": "免费模型", - "reasoning": "推理模型", - "embedding": "嵌入模型", + "vision": "视觉", + "websearch": "联网", + "free": "免费", + "reasoning": "推理", + "embedding": "嵌入", "embedding_model": "嵌入模型", "embedding_model_tooltip": "在设置->模型服务中点击管理按钮添加", "dimensions": "{{dimensions}} 维", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index c0e5e9f4..8e1e3f31 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -493,7 +493,7 @@ "delete.title": "刪除提供者", "docs_check": "檢查", "docs_more_details": "查看更多細節", - "get_api_key": "獲取密鑰", + "get_api_key": "點擊這裡獲取密鑰", "no_models": "請先添加模型再檢查 API 連接", "not_checked": "未檢查", "remove_duplicate_keys": "移除重複密鑰", @@ -635,11 +635,11 @@ "reasoning": "推理" }, "all": "全部", - "vision": "視覺模型", - "websearch": "網路搜索模型", - "free": "免費模型", - "reasoning": "推理模型", - "embedding": "嵌入模型", + "vision": "視覺", + "websearch": "網路搜索", + "free": "免費", + "reasoning": "推理", + "embedding": "嵌入", "embedding_model": "嵌入模型", "embedding_model_tooltip": "在设置->模型服务中点击管理按钮添加", "dimensions": "{{dimensions}} 維", diff --git a/src/renderer/src/pages/home/Inputbar/MentionModelsButton.tsx b/src/renderer/src/pages/home/Inputbar/MentionModelsButton.tsx index 6d6fa0f4..05a9c796 100644 --- a/src/renderer/src/pages/home/Inputbar/MentionModelsButton.tsx +++ b/src/renderer/src/pages/home/Inputbar/MentionModelsButton.tsx @@ -48,9 +48,9 @@ const MentionModelsButton: FC = ({ onMentionModel: onSelect, ToolbarButto key: getModelUniqId(m), label: ( - - {m?.name} - + + {m?.name} + {/* sm.id === m.id)} /> */} { @@ -136,6 +136,13 @@ const ModelItem = styled.div` } ` +const ModelNameRow = styled.div` + display: flex; + flex-direction: row; + align-items: center; + gap: 8px; +` + const PinIcon = styled.span.attrs({ className: 'pin-icon' })<{ $isPinned: boolean }>` margin-left: auto; padding: 0 8px; diff --git a/src/renderer/src/pages/home/components/SelectModelButton.tsx b/src/renderer/src/pages/home/components/SelectModelButton.tsx index 137f9b48..bac2fee8 100644 --- a/src/renderer/src/pages/home/components/SelectModelButton.tsx +++ b/src/renderer/src/pages/home/components/SelectModelButton.tsx @@ -39,7 +39,7 @@ const SelectModelButton: FC = ({ assistant }) => { {model ? model.name : t('button.select_model')} {providerName ? '| ' + providerName : ''} - + ) diff --git a/src/renderer/src/pages/settings/ProviderSettings/EditModelsPopup.tsx b/src/renderer/src/pages/settings/ProviderSettings/EditModelsPopup.tsx index 43a1b17b..d1680560 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/EditModelsPopup.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/EditModelsPopup.tsx @@ -237,6 +237,10 @@ const ListItemHeader = styled.div` ` const ListItemName = styled.div` + display: flex; + flex-direction: row; + align-items: center; + gap: 10px; color: var(--color-text); font-size: 14px; font-weight: 600; @@ -252,7 +256,6 @@ const ModelHeaderTitle = styled.div` const Question = styled(QuestionCircleOutlined)` cursor: pointer; - margin: 0 10px; color: #888; ` diff --git a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx index 194d63fd..52a27180 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx @@ -309,8 +309,10 @@ const ProviderSetting: FC = ({ provider: _provider }) => { {model?.name?.[0]?.toUpperCase()} - {model?.name} - + + {model?.name} + + @@ -360,6 +362,13 @@ const ModelListHeader = styled.div` align-items: center; ` +const ModelNameRow = styled.div` + display: flex; + flex-direction: row; + align-items: center; + gap: 10px; +` + const RemoveIcon = styled(MinusCircleOutlined)` font-size: 18px; margin-left: 10px; @@ -369,7 +378,7 @@ const RemoveIcon = styled(MinusCircleOutlined)` ` const SettingIcon = styled(SettingOutlined)` - margin-left: 10px; + margin-left: 2px; color: var(--color-text); cursor: pointer; transition: all 0.2s ease-in-out; diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 1f822493..35891cc0 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -30,7 +30,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 62, + version: 63, blacklist: ['runtime'], migrate }, diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 7d832967..4b72e409 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -906,7 +906,6 @@ const migrateConfig = { state.minapps.enabled.push(mintop) } } - removeMiniAppIconsFromState(state) return state } }