docs: Update translations and UI for better readability.
- Updated English translations in internationalization resources to simplify search assistant placeholder. - Removed unused import, improved text search UI and adjusted font sizes for better readability.
This commit is contained in:
parent
fd5cba5219
commit
98704fdb28
@ -100,7 +100,7 @@ const resources = {
|
|||||||
'suggestions.title': 'Suggested Questions',
|
'suggestions.title': 'Suggested Questions',
|
||||||
'add.assistant.title': 'Add Assistant',
|
'add.assistant.title': 'Add Assistant',
|
||||||
'message.new.context': 'New Context',
|
'message.new.context': 'New Context',
|
||||||
'assistant.search.placeholder': 'Search Assistants'
|
'assistant.search.placeholder': 'Search'
|
||||||
},
|
},
|
||||||
agents: {
|
agents: {
|
||||||
title: 'Assistants',
|
title: 'Assistants',
|
||||||
@ -356,7 +356,7 @@ const resources = {
|
|||||||
'suggestions.title': '建议的问题',
|
'suggestions.title': '建议的问题',
|
||||||
'add.assistant.title': '添加智能体',
|
'add.assistant.title': '添加智能体',
|
||||||
'message.new.context': '清除上下文',
|
'message.new.context': '清除上下文',
|
||||||
'assistant.search.placeholder': '搜索智能体'
|
'assistant.search.placeholder': '搜索'
|
||||||
},
|
},
|
||||||
agents: {
|
agents: {
|
||||||
title: '智能体',
|
title: '智能体',
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { DeleteOutlined, EditOutlined, MinusCircleOutlined, SearchOutlined } from '@ant-design/icons'
|
import { DeleteOutlined, EditOutlined, MinusCircleOutlined } from '@ant-design/icons'
|
||||||
import DragableList from '@renderer/components/DragableList'
|
import DragableList from '@renderer/components/DragableList'
|
||||||
import CopyIcon from '@renderer/components/Icons/CopyIcon'
|
import CopyIcon from '@renderer/components/Icons/CopyIcon'
|
||||||
import AssistantSettingPopup from '@renderer/components/Popups/AssistantSettingPopup'
|
import AssistantSettingPopup from '@renderer/components/Popups/AssistantSettingPopup'
|
||||||
import { useAssistant, useAssistants } from '@renderer/hooks/useAssistant'
|
import { useAssistant, useAssistants } from '@renderer/hooks/useAssistant'
|
||||||
import { useRuntime } from '@renderer/hooks/useStore'
|
|
||||||
import { getDefaultTopic, syncAsistantToAgent } from '@renderer/services/assistant'
|
import { getDefaultTopic, syncAsistantToAgent } from '@renderer/services/assistant'
|
||||||
import { EVENT_NAMES, EventEmitter } from '@renderer/services/event'
|
import { EVENT_NAMES, EventEmitter } from '@renderer/services/event'
|
||||||
import { useAppDispatch, useAppSelector } from '@renderer/store'
|
import { useAppDispatch, useAppSelector } from '@renderer/store'
|
||||||
@ -30,7 +29,6 @@ const Assistants: FC<Props> = ({ activeAssistant, setActiveAssistant, onCreateAs
|
|||||||
const { updateAssistant, removeAllTopics } = useAssistant(activeAssistant.id)
|
const { updateAssistant, removeAllTopics } = useAssistant(activeAssistant.id)
|
||||||
const searchRef = useRef<InputRef>(null)
|
const searchRef = useRef<InputRef>(null)
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { searching } = useRuntime()
|
|
||||||
const dispatch = useAppDispatch()
|
const dispatch = useAppDispatch()
|
||||||
|
|
||||||
const onDelete = useCallback(
|
const onDelete = useCallback(
|
||||||
@ -156,12 +154,10 @@ const Assistants: FC<Props> = ({ activeAssistant, setActiveAssistant, onCreateAs
|
|||||||
<SearchContainer>
|
<SearchContainer>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('chat.assistant.search.placeholder')}
|
placeholder={t('chat.assistant.search.placeholder')}
|
||||||
variant="filled"
|
|
||||||
prefix={<SearchOutlined style={{ color: 'var(--color-icon)' }} />}
|
|
||||||
suffix={<CommandKey>⌘+K</CommandKey>}
|
suffix={<CommandKey>⌘+K</CommandKey>}
|
||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4, borderWidth: 0.5 }}
|
||||||
onKeyDown={onSearch}
|
onKeyDown={onSearch}
|
||||||
ref={searchRef}
|
ref={searchRef}
|
||||||
onFocus={() => dispatch(setSearching(true))}
|
onFocus={() => dispatch(setSearching(true))}
|
||||||
@ -257,14 +253,14 @@ const ArrowRightButton = styled.div`
|
|||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
right: 9px;
|
right: 9px;
|
||||||
top: 6px;
|
top: 6px;
|
||||||
.anticon {
|
.iconfont {
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const TopicCount = styled.div`
|
const TopicCount = styled.div`
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-2);
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
background-color: var(--color-background-mute);
|
background-color: var(--color-background-mute);
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
@ -283,11 +279,11 @@ const SearchContainer = styled.div`
|
|||||||
`
|
`
|
||||||
|
|
||||||
const CommandKey = styled.div`
|
const CommandKey = styled.div`
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-2);
|
||||||
font-size: 11px;
|
font-size: 10px;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: var(--color-background-mute);
|
background-color: var(--color-background);
|
||||||
margin-right: -4px;
|
margin-right: -4px;
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user