diff --git a/src/renderer/src/assets/fonts/icon-fonts/iconfont.css b/src/renderer/src/assets/fonts/icon-fonts/iconfont.css index c49c6ae635..d1512cd687 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 5eee38b818..a059cc7088 100644 Binary files a/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 and b/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 differ diff --git a/src/renderer/src/components/Icons/ReasoningIcon.tsx b/src/renderer/src/components/Icons/ReasoningIcon.tsx new file mode 100644 index 0000000000..92b86588a3 --- /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 6be4a08701..df678bbf90 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 42ab971eb9..41bc43345b 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 c4a25ab47c..463e869774 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 7fbe946681..01534c6726 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 ee0fcabab8..ab51d583e8 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 9bd79e56c2..4b8e4e887d 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 b3e74af90a..36a53a3ea2 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 c0e5e9f475..8e1e3f3101 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 6d6fa0f40c..05a9c79661 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 137f9b4822..bac2fee8a3 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 43a1b17b5f..d168056091 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 194d63fddf..52a27180df 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 1f822493cc..35891cc07e 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 7d8329670c..4b72e409ac 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 } }