refactor: replace antd Input with @cherrystudio/ui Input across components

This commit is contained in:
icarus 2025-11-02 23:57:35 +08:00
parent 3911ee2843
commit f7f689b326
93 changed files with 178 additions and 99 deletions

View File

@ -1,10 +1,9 @@
// Original path: src/renderer/src/components/CollapsibleSearchBar.tsx
import type { InputRef } from 'antd'
import { Input } from 'antd'
import { Search } from 'lucide-react'
import { motion } from 'motion/react'
import React, { memo, useCallback, useEffect, useRef, useState } from 'react'
import { Input } from '../../primitives/input'
import { Tooltip } from '../../primitives/tooltip'
interface CollapsibleSearchBarProps {
@ -30,7 +29,7 @@ const CollapsibleSearchBar = ({
}: CollapsibleSearchBarProps) => {
const [searchVisible, setSearchVisible] = useState(false)
const [searchText, setSearchText] = useState('')
const inputRef = useRef<InputRef>(null)
const inputRef = useRef<HTMLInputElement>(null)
const handleTextChange = useCallback(
(text: string) => {

View File

@ -1,6 +1,9 @@
import { cn } from '@cherrystudio/ui/utils'
import { EyeIcon } from 'lucide-react'
import React, { useMemo } from 'react'
import { Button } from './button'
export interface InputProps extends React.ComponentPropsWithRef<'input'> {
startContent?: React.ReactNode
endContent?: React.ReactNode
@ -8,7 +11,7 @@ export interface InputProps extends React.ComponentPropsWithRef<'input'> {
caption?: string
}
export function Input({ className, type, required, label, caption, ...props }: InputProps) {
export function Input({ startContent, endContent, className, type, required, label, caption, ...props }: InputProps) {
const id = React.useId()
const input = useMemo(() => {
@ -35,7 +38,14 @@ export function Input({ className, type, required, label, caption, ...props }: I
return (
<div className="flex flex-col w-full">
<label htmlFor={id}>{label}</label>
<div>{startContent}</div>
{input}
<div>
<Button>
<EyeIcon />
</Button>
{endContent}
</div>
{caption && <div className="text-muted-foreground">{caption}</div>}
</div>
)
@ -43,3 +53,5 @@ export function Input({ className, type, required, label, caption, ...props }: I
return input
}
function InputPassword() {}

View File

@ -1,7 +1,7 @@
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import i18n from '@renderer/i18n'
import type { InputRef } from 'antd'
import { Input } from 'antd'
import { Search } from 'lucide-react'
import { motion } from 'motion/react'
import React, { memo, useCallback, useEffect, useRef, useState } from 'react'

View File

@ -1,7 +1,8 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { backupToLocal } from '@renderer/services/BackupService'
import { Input, Modal } from 'antd'
import { Modal } from 'antd'
import dayjs from 'dayjs'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,8 +1,8 @@
import { RowFlex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { FolderIcon as NutstoreFolderIcon } from '@renderer/components/Icons/NutstoreIcons'
import { Input } from 'antd'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -1,4 +1,5 @@
import { Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { loggerService } from '@logger'
import i18n from '@renderer/i18n'
@ -11,7 +12,7 @@ import {
messageToMarkdownWithReasoning,
topicToMarkdown
} from '@renderer/utils/export'
import { Alert, Empty, Form, Input, Modal, Select, Spin, TreeSelect } from 'antd'
import { Alert, Empty, Form, Modal, Select, Spin, TreeSelect } from 'antd'
import React, { useEffect, useState } from 'react'
const logger = loggerService.withContext('ObsidianExportDialog')

View File

@ -1,4 +1,5 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import { useAssistants, useDefaultAssistant } from '@renderer/hooks/useAssistant'
import { useAssistantPresets } from '@renderer/hooks/useAssistantPresets'
@ -9,7 +10,7 @@ import { EVENT_NAMES, EventEmitter } from '@renderer/services/EventService'
import type { Assistant, AssistantPreset } from '@renderer/types'
import { uuid } from '@renderer/utils'
import type { InputRef } from 'antd'
import { Divider, Input, Modal, Tag } from 'antd'
import { Divider, Modal, Tag } from 'antd'
import { take } from 'lodash'
import { Search } from 'lucide-react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'

View File

@ -1,11 +1,12 @@
import { Button, Flex, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { type HealthResult, HealthStatusIndicator } from '@renderer/components/HealthStatusIndicator'
import { EditIcon } from '@renderer/components/Icons'
import { StreamlineGoodHealthAndWellBeing } from '@renderer/components/Icons/SVGIcon'
import type { ApiKeyWithStatus } from '@renderer/types/healthCheck'
import { maskApiKey } from '@renderer/utils/api'
import type { InputRef } from 'antd'
import { Input, List, Popconfirm, Typography } from 'antd'
import { List, Popconfirm, Typography } from 'antd'
import { Check, Minus, X } from 'lucide-react'
import type { FC } from 'react'
import { memo, useEffect, useRef, useState } from 'react'

View File

@ -1,5 +1,6 @@
import { Box } from '@cherrystudio/ui'
import { Input, Modal } from 'antd'
import { Input } from '@cherrystudio/ui'
import { Modal } from 'antd'
import type { TextAreaProps } from 'antd/es/input'
import type { ReactNode } from 'react'
import { useRef, useState } from 'react'

View File

@ -1,6 +1,6 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import type { InputRef } from 'antd'
import { Input } from 'antd'
import { Search } from 'lucide-react'
import React, { memo, useCallback, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,12 +1,13 @@
import { Center, ColFlex, RowFlex } from '@cherrystudio/ui'
import { Avatar, EmojiAvatar } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { cacheService } from '@data/CacheService'
import { usePreference } from '@data/hooks/usePreference'
import DefaultAvatar from '@renderer/assets/images/avatar.png'
import useAvatar from '@renderer/hooks/useAvatar'
import ImageStorage from '@renderer/services/ImageStorage'
import { compressImage, isEmoji } from '@renderer/utils'
import { Dropdown, Input, Modal, Popover, Upload } from 'antd'
import { Dropdown, Modal, Popover, Upload } from 'antd'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -1,9 +1,9 @@
import { SearchOutlined } from '@ant-design/icons'
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { ProviderAvatarPrimitive } from '@renderer/components/ProviderAvatar'
import { PROVIDER_LOGO_MAP } from '@renderer/config/providers'
import { getProviderLabel } from '@renderer/i18n/label'
import { Input } from 'antd'
import type { FC } from 'react'
import { useMemo, useState } from 'react'
import styled from 'styled-components'

View File

@ -1,7 +1,8 @@
import { InboxOutlined, LinkOutlined, LoadingOutlined, UploadOutlined } from '@ant-design/icons'
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input, Modal, Spin, Tabs, Upload } from 'antd'
import { Input } from '@cherrystudio/ui'
import { Modal, Spin, Tabs, Upload } from 'antd'
const { Dragger } = Upload
import type { RcFile } from 'antd/es/upload'

View File

@ -1,7 +1,7 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useTheme } from '@renderer/context/ThemeProvider'
import { Input } from 'antd'
import React, { useCallback, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,7 +1,7 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useTheme } from '@renderer/context/ThemeProvider'
import { Input } from 'antd'
import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,6 +1,7 @@
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { type NodeViewProps, NodeViewWrapper } from '@tiptap/react'
import { Checkbox, Dropdown, Input, type MenuProps } from 'antd'
import { Checkbox, Dropdown, type MenuProps } from 'antd'
import { Calendar, Check, FileText, Hash, MoreHorizontal, Plus, Tag as TagIcon, Trash2, Type, X } from 'lucide-react'
import React, { useCallback, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,6 +1,7 @@
import { Input } from '@cherrystudio/ui'
import { backupToS3 } from '@renderer/services/BackupService'
import { formatFileSize } from '@renderer/utils'
import { Input, Modal, Select, Spin } from 'antd'
import { Modal, Select, Spin } from 'antd'
import dayjs from 'dayjs'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { Input } from '@cherrystudio/ui'
import { backupToWebdav } from '@renderer/services/BackupService'
import { Input, Modal } from 'antd'
import { Modal } from 'antd'
import dayjs from 'dayjs'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,4 +1,5 @@
import { Avatar, Button, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import AiProvider from '@renderer/aiCore'
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
import ModelSelector from '@renderer/components/ModelSelector'
@ -18,7 +19,7 @@ import type { EndpointType, Model } from '@renderer/types'
import { getClaudeSupportedProviders } from '@renderer/utils/provider'
import type { TerminalConfig } from '@shared/config/constant'
import { codeTools, terminalApps } from '@shared/config/constant'
import { Alert, Checkbox, Input, Popover, Select, Space } from 'antd'
import { Alert, Checkbox, Popover, Select, Space } from 'antd'
import { ArrowUpRight, Download, FolderOpen, HelpCircle, Terminal, X } from 'lucide-react'
import type { FC } from 'react'
import { useCallback, useEffect, useMemo, useState } from 'react'

View File

@ -1,10 +1,11 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useAppDispatch } from '@renderer/store'
import { loadTopicMessagesThunk } from '@renderer/store/thunk/messageThunk'
import type { Topic } from '@renderer/types'
import type { Message } from '@renderer/types/newMessage'
import type { InputRef } from 'antd'
import { Divider, Input } from 'antd'
import { Divider } from 'antd'
import { last } from 'lodash'
import { ChevronLeft, CornerDownLeft, Search } from 'lucide-react'
import type { FC } from 'react'

View File

@ -1,4 +1,5 @@
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { ActionIconButton } from '@renderer/components/Buttons'
import type { QuickPanelListItem } from '@renderer/components/QuickPanel'
import { QuickPanelReservedSymbol, useQuickPanel } from '@renderer/components/QuickPanel'
@ -11,7 +12,7 @@ import { getProviderByModel } from '@renderer/services/AssistantService'
import { EventEmitter } from '@renderer/services/EventService'
import type { MCPPrompt, MCPResource, MCPServer } from '@renderer/types'
import { isToolUseModeFunction } from '@renderer/utils/assistant'
import { Form, Input } from 'antd'
import { Form } from 'antd'
import { CircleX, Hammer, Plus } from 'lucide-react'
import type { FC } from 'react'
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'

View File

@ -1,4 +1,5 @@
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { ActionIconButton } from '@renderer/components/Buttons'
import {
type QuickPanelListItem,
@ -10,7 +11,7 @@ import { useAssistant } from '@renderer/hooks/useAssistant'
import { useTimer } from '@renderer/hooks/useTimer'
import QuickPhraseService from '@renderer/services/QuickPhraseService'
import type { QuickPhrase } from '@renderer/types'
import { Input, Modal, Radio, Space } from 'antd'
import { Modal, Radio, Space } from 'antd'
import { BotMessageSquare, Plus, Zap } from 'lucide-react'
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,10 +1,11 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { TopView } from '@renderer/components/TopView'
import { searchKnowledgeBase } from '@renderer/services/KnowledgeService'
import type { FileMetadata, KnowledgeBase, KnowledgeSearchResult } from '@renderer/types'
import type { InputRef } from 'antd'
import { Divider, Input, List, Modal, Spin } from 'antd'
import { Divider, List, Modal, Spin } from 'antd'
import { Search } from 'lucide-react'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,4 +1,5 @@
import { InfoTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import InputEmbeddingDimension from '@renderer/components/InputEmbeddingDimension'
import ModelSelector from '@renderer/components/ModelSelector'
import { DEFAULT_KNOWLEDGE_DOCUMENT_COUNT } from '@renderer/config/constant'
@ -7,7 +8,7 @@ import { useProviders } from '@renderer/hooks/useProvider'
import { getModelUniqId } from '@renderer/services/ModelService'
import type { KnowledgeBase, PreprocessProvider } from '@renderer/types'
import type { SelectProps } from 'antd'
import { Input, Select, Slider } from 'antd'
import { Select, Slider } from 'antd'
import { useTranslation } from 'react-i18next'
import { SettingsItem, SettingsPanel } from './styles'

View File

@ -1,10 +1,10 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { Navbar, NavbarMain } from '@renderer/components/app/Navbar'
import App from '@renderer/components/MinApp/MinApp'
import Scrollbar from '@renderer/components/Scrollbar'
import { useMinapps } from '@renderer/hooks/useMinapps'
import { useNavbarPosition } from '@renderer/hooks/useNavbar'
import { Input } from 'antd'
import { Search, SettingsIcon } from 'lucide-react'
import type { FC } from 'react'
import React, { useState } from 'react'

View File

@ -1,10 +1,11 @@
import { PlusOutlined, UploadOutlined } from '@ant-design/icons'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { loadCustomMiniApp, ORIGIN_DEFAULT_MIN_APPS, updateDefaultMinApps } from '@renderer/config/minapps'
import { useMinapps } from '@renderer/hooks/useMinapps'
import type { MinAppType } from '@renderer/types'
import { Form, Input, Modal, Radio, Upload } from 'antd'
import { Form, Modal, Radio, Upload } from 'antd'
import type { UploadFile } from 'antd/es/upload/interface'
import type { FC } from 'react'
import { useState } from 'react'

View File

@ -1,4 +1,5 @@
import { RowFlex, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { BreadcrumbItem, Breadcrumbs } from '@heroui/react'
import { loggerService } from '@logger'
import { NavbarCenter, NavbarHeader, NavbarRight } from '@renderer/components/app/Navbar'
@ -6,7 +7,7 @@ import { useActiveNode } from '@renderer/hooks/useNotesQuery'
import { useNotesSettings } from '@renderer/hooks/useNotesSettings'
import { useShowWorkspace } from '@renderer/hooks/useShowWorkspace'
import { findNode } from '@renderer/services/NotesTreeService'
import { Dropdown, Input } from 'antd'
import { Dropdown } from 'antd'
import { t } from 'i18next'
import { MoreHorizontal, PanelLeftClose, PanelRightClose, Star } from 'lucide-react'
import { useCallback, useEffect, useRef, useState } from 'react'

View File

@ -1,3 +1,4 @@
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import HighlightText from '@renderer/components/HighlightText'
import { DeleteIcon } from '@renderer/components/Icons'
@ -17,7 +18,7 @@ import type { NotesSortType, NotesTreeNode } from '@renderer/types/note'
import { exportNote } from '@renderer/utils/export'
import { useVirtualizer } from '@tanstack/react-virtual'
import type { InputRef, MenuProps } from 'antd'
import { Dropdown, Input } from 'antd'
import { Dropdown } from 'antd'
import type { ItemType, MenuItemType } from 'antd/es/menu/interface'
import {
ChevronDown,

View File

@ -1,8 +1,9 @@
import { CheckOutlined } from '@ant-design/icons'
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import type { NotesSortType } from '@renderer/types/note'
import type { MenuProps } from 'antd'
import { Dropdown, Input } from 'antd'
import { Dropdown } from 'antd'
import { ArrowLeft, ArrowUpNarrowWide, FilePlus2, FolderPlus, Search, Star } from 'lucide-react'
import type { FC } from 'react'
import { useCallback } from 'react'

View File

@ -1,5 +1,6 @@
import { PlusOutlined, RedoOutlined } from '@ant-design/icons'
import { Avatar, Button, InfoTooltip, RowFlex, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useCache } from '@data/hooks/useCache'
import { usePreference } from '@data/hooks/usePreference'
import { loggerService } from '@logger'
@ -19,7 +20,7 @@ import { translateText } from '@renderer/services/TranslateService'
import type { FileMetadata } from '@renderer/types'
import type { PaintingAction, PaintingsState } from '@renderer/types'
import { getErrorMessage, uuid } from '@renderer/utils'
import { Input, InputNumber, Radio, Segmented, Select, Slider, Upload } from 'antd'
import { InputNumber, Radio, Segmented, Select, Slider, Upload } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import type { FC } from 'react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'

View File

@ -1,5 +1,6 @@
import { PlusOutlined, RedoOutlined } from '@ant-design/icons'
import { Avatar, Button, InfoTooltip, RowFlex, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useCache } from '@data/hooks/useCache'
import DMXAPIToImg from '@renderer/assets/images/providers/DMXAPI-to-img.webp'
import { Navbar, NavbarCenter, NavbarRight } from '@renderer/components/app/Navbar'
@ -12,7 +13,7 @@ import FileManager from '@renderer/services/FileManager'
import type { FileMetadata } from '@renderer/types'
import { convertToBase64, uuid } from '@renderer/utils'
import type { DmxapiPainting } from '@types'
import { Input, InputNumber, Segmented, Select } from 'antd'
import { InputNumber, Segmented, Select } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import type { FC } from 'react'
import React, { useEffect, useRef, useState } from 'react'

View File

@ -1,5 +1,6 @@
import { PlusOutlined, RedoOutlined } from '@ant-design/icons'
import { Button, RowFlex, Switch, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useCache } from '@data/hooks/useCache'
import { loggerService } from '@logger'
import { Navbar, NavbarCenter, NavbarRight } from '@renderer/components/app/Navbar'
@ -15,7 +16,7 @@ import FileManager from '@renderer/services/FileManager'
import { translateText } from '@renderer/services/TranslateService'
import type { FileMetadata, OvmsPainting } from '@renderer/types'
import { getErrorMessage, uuid } from '@renderer/utils'
import { Avatar, Input, InputNumber, Select, Slider } from 'antd'
import { Avatar, InputNumber, Select, Slider } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import { Info } from 'lucide-react'
import type { FC } from 'react'

View File

@ -1,5 +1,6 @@
import { PlusOutlined, RedoOutlined } from '@ant-design/icons'
import { Button, ColFlex, InfoTooltip, RowFlex, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useCache } from '@data/hooks/useCache'
import { usePreference } from '@data/hooks/usePreference'
import { loggerService } from '@logger'
@ -23,7 +24,7 @@ import FileManager from '@renderer/services/FileManager'
import { translateText } from '@renderer/services/TranslateService'
import type { FileMetadata, Painting } from '@renderer/types'
import { getErrorMessage, uuid } from '@renderer/utils'
import { Input, InputNumber, Radio, Select, Slider } from 'antd'
import { InputNumber, Radio, Select, Slider } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import type { FC } from 'react'
import { useEffect, useRef, useState } from 'react'

View File

@ -1,9 +1,10 @@
import { CloseOutlined, LinkOutlined, RedoOutlined, UploadOutlined } from '@ant-design/icons'
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { convertToBase64 } from '@renderer/utils'
import { Input, InputNumber, Select, Upload } from 'antd'
import { InputNumber, Select, Upload } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import { useCallback } from 'react'

View File

@ -1,4 +1,5 @@
import { Button, HelpTooltip, RowFlex, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import ModelAvatar from '@renderer/components/Avatar/ModelAvatar'
import EditableNumber from '@renderer/components/EditableNumber'
import { DeleteIcon, ResetIcon } from '@renderer/components/Icons'
@ -10,7 +11,7 @@ import { useTimer } from '@renderer/hooks/useTimer'
import { SettingRow } from '@renderer/pages/settings'
import type { Assistant, AssistantSettingCustomParameters, AssistantSettings, Model } from '@renderer/types'
import { modalConfirm } from '@renderer/utils'
import { Col, Divider, Input, InputNumber, Row, Select, Slider } from 'antd'
import { Col, Divider, InputNumber, Row, Select, Slider } from 'antd'
import { isNull } from 'lodash'
import { PlusIcon } from 'lucide-react'
import type { FC } from 'react'

View File

@ -4,6 +4,7 @@ import CloseCircleFilled from '@ant-design/icons/lib/icons/CloseCircleFilled'
import { Box, RowFlex, SpaceBetweenRowFlex } from '@cherrystudio/ui'
import { CodeEditor } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { Popover, PopoverContent, PopoverTrigger, Tooltip } from '@heroui/react'
import EmojiPicker from '@renderer/components/EmojiPicker'
@ -13,7 +14,6 @@ import { usePromptProcessor } from '@renderer/hooks/usePromptProcessor'
import { estimateTextTokens } from '@renderer/services/TokenService'
import type { Assistant, AssistantSettings } from '@renderer/types'
import { getLeadingEmoji } from '@renderer/utils'
import { Input } from 'antd'
import { Edit, HelpCircle, Save } from 'lucide-react'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,11 +1,12 @@
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { DraggableList } from '@renderer/components/DraggableList'
import { DeleteIcon, EditIcon } from '@renderer/components/Icons'
import FileItem from '@renderer/pages/files/FileItem'
import type { Assistant, QuickPhrase } from '@renderer/types'
import { Input, Modal, Popconfirm, Space } from 'antd'
import { Modal, Popconfirm, Space } from 'antd'
import { PlusIcon } from 'lucide-react'
import type { FC } from 'react'
import { useEffect, useState } from 'react'

View File

@ -1,9 +1,9 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useSettings } from '@renderer/hooks/useSettings'
import { useAppDispatch } from '@renderer/store'
import { setAgentssubscribeUrl } from '@renderer/store/settings'
import Input from 'antd/es/input/Input'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,12 +1,12 @@
import { InfoTooltip, RowFlex } from '@cherrystudio/ui'
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { AppLogo } from '@renderer/config/env'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useMinappPopup } from '@renderer/hooks/useMinappPopup'
import { Space } from 'antd'
import { Input } from 'antd'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { DeleteOutlined, FolderOpenOutlined, SaveOutlined, SyncOutlined } from '@ant-design/icons'
import { Button, RowFlex, Switch, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { loggerService } from '@logger'
import { LocalBackupManager } from '@renderer/components/LocalBackupManager'
@ -9,7 +10,6 @@ import { useTheme } from '@renderer/context/ThemeProvider'
import { startAutoSync, stopAutoSync } from '@renderer/services/BackupService'
import { useAppSelector } from '@renderer/store'
import type { AppInfo } from '@renderer/types'
import { Input } from 'antd'
import dayjs from 'dayjs'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -2,9 +2,9 @@ import { DeleteOutlined, FolderOpenOutlined } from '@ant-design/icons'
import { RowFlex } from '@cherrystudio/ui'
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { useTheme } from '@renderer/context/ThemeProvider'
import Input from 'antd/es/input/Input'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,11 +1,11 @@
import { Button, InfoTooltip, RowFlex, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { Client } from '@notionhq/client'
import { AppLogo } from '@renderer/config/env'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useMinappPopup } from '@renderer/hooks/useMinappPopup'
import { Space } from 'antd'
import { Input } from 'antd'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { CheckOutlined, FolderOutlined, LoadingOutlined, SyncOutlined } from '@ant-design/icons'
import { Button, RowFlex, Switch, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import NutstorePathPopup from '@renderer/components/Popups/NutsorePathPopup'
import Selector from '@renderer/components/Selector'
@ -19,7 +20,7 @@ import {
import { useAppSelector } from '@renderer/store'
import { modalConfirm } from '@renderer/utils'
import { NUTSTORE_HOST } from '@shared/config/nutstore'
import { Input, Typography } from 'antd'
import { Typography } from 'antd'
import dayjs from 'dayjs'
import type { FC } from 'react'
import { useCallback, useEffect, useState } from 'react'

View File

@ -1,5 +1,6 @@
import { FolderOpenOutlined, SaveOutlined, SyncOutlined } from '@ant-design/icons'
import { Button, InfoTooltip, RowFlex, Switch, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { S3BackupManager } from '@renderer/components/S3BackupManager'
import { S3BackupModal, useS3BackupModal } from '@renderer/components/S3Modals'
@ -9,7 +10,6 @@ import { useTheme } from '@renderer/context/ThemeProvider'
import { useMinappPopup } from '@renderer/hooks/useMinappPopup'
import { startAutoSync, stopAutoSync } from '@renderer/services/BackupService'
import { useAppSelector } from '@renderer/store'
import { Input } from 'antd'
import dayjs from 'dayjs'
import type { FC } from 'react'
import { useState } from 'react'

View File

@ -1,11 +1,11 @@
import { Button, InfoTooltip, RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { loggerService } from '@logger'
import { AppLogo } from '@renderer/config/env'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useMinappPopup } from '@renderer/hooks/useMinappPopup'
import { Space } from 'antd'
import { Input } from 'antd'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { FolderOpenOutlined, SaveOutlined, SyncOutlined } from '@ant-design/icons'
import { Button, RowFlex, Switch, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import Selector from '@renderer/components/Selector'
import { WebdavBackupManager } from '@renderer/components/WebdavBackupManager'
@ -7,7 +8,6 @@ import { useWebdavBackupModal, WebdavBackupModal } from '@renderer/components/We
import { useTheme } from '@renderer/context/ThemeProvider'
import { startAutoSync, stopAutoSync } from '@renderer/services/BackupService'
import { useAppSelector } from '@renderer/store'
import { Input } from 'antd'
import dayjs from 'dayjs'
import type { FC } from 'react'
import { useState } from 'react'

View File

@ -1,10 +1,10 @@
import { Button, InfoTooltip, RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { AppLogo } from '@renderer/config/env'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useMinappPopup } from '@renderer/hooks/useMinappPopup'
import { Space } from 'antd'
import { Input } from 'antd'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,7 +1,7 @@
import { Input } from '@cherrystudio/ui'
import { ErrorBoundary } from '@renderer/components/ErrorBoundary'
import { useOcrProvider } from '@renderer/hooks/useOcrProvider'
import { BuiltinOcrProviderIds, isOcrPpocrProvider } from '@renderer/types'
import { Input } from 'antd'
import { startTransition, useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,11 +1,12 @@
import { ExportOutlined } from '@ant-design/icons'
import { Avatar, Button, Flex, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { ApiKeyListPopup } from '@renderer/components/Popups/ApiKeyListPopup'
import { getPreprocessProviderLogo, PREPROCESS_PROVIDER_CONFIG } from '@renderer/config/preprocessProviders'
import { usePreprocessProvider } from '@renderer/hooks/usePreprocess'
import type { PreprocessProvider } from '@renderer/types'
import { formatApiKeys, hasObjectKey } from '@renderer/utils'
import { Divider, Input } from 'antd'
import { Divider } from 'antd'
import Link from 'antd/es/typography/Link'
import { List } from 'lucide-react'
import type { FC } from 'react'

View File

@ -1,6 +1,7 @@
import { InfoTooltip, RowFlex } from '@cherrystudio/ui'
import { Flex } from '@cherrystudio/ui'
import { Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useMultiplePreferences, usePreference } from '@data/hooks/usePreference'
import Selector from '@renderer/components/Selector'
import { useTheme } from '@renderer/context/ThemeProvider'
@ -11,7 +12,6 @@ import { isValidProxyUrl } from '@renderer/utils'
import { formatErrorMessage } from '@renderer/utils/error'
import { defaultByPassRules, defaultLanguage } from '@shared/config/constant'
import type { LanguageVarious } from '@shared/data/preference/preferenceTypes'
import { Input } from 'antd'
import type { FC } from 'react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,7 +1,8 @@
import { Button, Flex, RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useMCPServers } from '@renderer/hooks/useMCPServers'
import type { MCPServer } from '@renderer/types'
import { Divider, Input, Space } from 'antd'
import { Divider, Space } from 'antd'
import Link from 'antd/es/typography/Link'
import { SquareArrowOutUpRight } from 'lucide-react'
import { useCallback, useEffect, useState } from 'react'

View File

@ -1,5 +1,6 @@
import { Flex, Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import type { McpError } from '@modelcontextprotocol/sdk/types.js'
import { DeleteIcon } from '@renderer/components/Icons'
@ -10,7 +11,7 @@ import MCPDescription from '@renderer/pages/settings/MCPSettings/McpDescription'
import type { MCPPrompt, MCPResource, MCPServer, MCPTool } from '@renderer/types'
import { formatMcpError } from '@renderer/utils/error'
import type { TabsProps } from 'antd'
import { Badge, Form, Input, Radio, Select, Tabs } from 'antd'
import { Badge, Form, Radio, Select, Tabs } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import { ChevronDown, SaveIcon } from 'lucide-react'
import React, { useCallback, useEffect, useState } from 'react'

View File

@ -2,12 +2,13 @@ import { CheckOutlined, PlusOutlined } from '@ant-design/icons'
import { Center, RowFlex } from '@cherrystudio/ui'
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { nanoid } from '@reduxjs/toolkit'
import logo from '@renderer/assets/images/cherry-text-logo.svg'
import { useMCPServers } from '@renderer/hooks/useMCPServers'
import type { MCPServer } from '@renderer/types'
import { getMcpConfigSampleFromReadme } from '@renderer/utils'
import { Card, Input, Space, Spin, Tag, Typography } from 'antd'
import { Card, Space, Spin, Tag, Typography } from 'antd'
import { npxFinder } from 'npx-scope-finder'
import { type FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,8 +1,9 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import { useMCPServers } from '@renderer/hooks/useMCPServers'
import type { MCPServer } from '@renderer/types'
import { Form, Input, Modal, Select } from 'antd'
import { Form, Modal, Select } from 'antd'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -3,6 +3,7 @@ import { RowFlex } from '@cherrystudio/ui'
import { Flex } from '@cherrystudio/ui'
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { cacheService } from '@data/CacheService'
import { loggerService } from '@logger'
import { DeleteIcon, EditIcon, LoadingIcon, RefreshIcon } from '@renderer/components/Icons'
@ -19,7 +20,7 @@ import {
setGlobalMemoryEnabled
} from '@renderer/store/memory'
import type { MemoryItem } from '@types'
import { Badge, Dropdown, Empty, Form, Input, Modal, Pagination, Space, Spin } from 'antd'
import { Badge, Dropdown, Empty, Form, Modal, Pagination, Space, Spin } from 'antd'
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import { Brain, Calendar, MenuIcon, PlusIcon, Settings2, UserRound, UserRoundMinus, UserRoundPlus } from 'lucide-react'

View File

@ -1,5 +1,6 @@
import { CloseCircleFilled } from '@ant-design/icons'
import { Button, Flex, HelpTooltip, RowFlex, Switch, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import EmojiPicker from '@renderer/components/EmojiPicker'
import { ResetIcon } from '@renderer/components/Icons'
import { TopView } from '@renderer/components/TopView'
@ -8,7 +9,7 @@ import { useTheme } from '@renderer/context/ThemeProvider'
import { useDefaultAssistant } from '@renderer/hooks/useAssistant'
import type { AssistantSettings as AssistantSettingsType } from '@renderer/types'
import { getLeadingEmoji, modalConfirm } from '@renderer/utils'
import { Col, Input, InputNumber, Modal, Popover, Row, Slider } from 'antd'
import { Col, InputNumber, Modal, Popover, Row, Slider } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import type { Dispatch, FC, SetStateAction } from 'react'
import { useState } from 'react'

View File

@ -2,9 +2,10 @@ import { QuestionCircleOutlined } from '@ant-design/icons'
import { ColFlex, Flex, RowFlex } from '@cherrystudio/ui'
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { ResetIcon } from '@renderer/components/Icons'
import { Divider, Input, Modal, Popover } from 'antd'
import { Divider, Modal, Popover } from 'antd'
import { useCallback, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,11 +1,12 @@
import { Switch } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import Selector from '@renderer/components/Selector'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useNotesSettings } from '@renderer/hooks/useNotesSettings'
import type { EditorView } from '@renderer/types'
import { Input, Slider } from 'antd'
import { Slider } from 'antd'
import { FolderOpen } from 'lucide-react'
import type { FC } from 'react'
import { useEffect, useState } from 'react'

View File

@ -1,4 +1,5 @@
import { Center, ColFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { ProviderAvatarPrimitive } from '@renderer/components/ProviderAvatar'
import ProviderLogoPicker from '@renderer/components/ProviderLogoPicker'
@ -7,7 +8,7 @@ import { PROVIDER_LOGO_MAP } from '@renderer/config/providers'
import ImageStorage from '@renderer/services/ImageStorage'
import type { Provider, ProviderType } from '@renderer/types'
import { compressImage, generateColorFromChar, getForegroundColor } from '@renderer/utils'
import { Divider, Dropdown, Form, Input, Modal, Popover, Select, Upload } from 'antd'
import { Divider, Dropdown, Form, Modal, Popover, Select, Upload } from 'antd'
import type { ItemType } from 'antd/es/menu/interface'
import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,7 +1,8 @@
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { Alert, Input, Modal } from 'antd'
import { Alert, Modal } from 'antd'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -1,7 +1,8 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { PROVIDER_URLS } from '@renderer/config/providers'
import { useAwsBedrockSettings } from '@renderer/hooks/useAwsBedrock'
import { Alert, Input } from 'antd'
import { Alert } from 'antd'
import type { FC } from 'react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,4 +1,5 @@
import { Button, Flex, Switch, Tooltip, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import CopyIcon from '@renderer/components/Icons/CopyIcon'
import {
EmbeddingTag,
@ -22,7 +23,7 @@ import { useDynamicLabelWidth } from '@renderer/hooks/useDynamicLabelWidth'
import type { Model, ModelCapability, ModelType, Provider } from '@renderer/types'
import { getDefaultGroupName, getDifference, getUnion, uniqueObjectArray } from '@renderer/utils'
import type { ModalProps } from 'antd'
import { Divider, Form, Input, InputNumber, Modal, Select } from 'antd'
import { Divider, Form, InputNumber, Modal, Select } from 'antd'
import { cloneDeep } from 'lodash'
import { ChevronDown, ChevronUp, RotateCcw, SaveIcon } from 'lucide-react'
import type { FC } from 'react'

View File

@ -1,9 +1,10 @@
import { CheckCircleOutlined, CopyOutlined, ExclamationCircleOutlined } from '@ant-design/icons'
import { Button, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { useCopilot } from '@renderer/hooks/useCopilot'
import { useProvider } from '@renderer/hooks/useProvider'
import { Alert, Input, Slider, Steps, Typography } from 'antd'
import { Alert, Slider, Steps, Typography } from 'antd'
import type { FC } from 'react'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,12 +1,13 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import { isNotSupportedTextDelta } from '@renderer/config/models'
import { useProvider } from '@renderer/hooks/useProvider'
import type { Model, Provider } from '@renderer/types'
import { getDefaultGroupName } from '@renderer/utils'
import type { FormProps } from 'antd'
import { Form, Input, Modal } from 'antd'
import { Form, Modal } from 'antd'
import { find } from 'lodash'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,10 +1,11 @@
import { Button, RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { TopView } from '@renderer/components/TopView'
import { useTimer } from '@renderer/hooks/useTimer'
import type { Provider } from '@renderer/types'
import type { FormProps } from 'antd'
import { AutoComplete, Form, Input, Modal, Progress, Select } from 'antd'
import { AutoComplete, Form, Modal, Progress, Select } from 'antd'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,4 +1,5 @@
import { Button, Flex, RowFlex, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import { LoadingIcon } from '@renderer/components/Icons'
import { TopView } from '@renderer/components/TopView'
@ -22,7 +23,6 @@ import type { Model, Provider } from '@renderer/types'
import { filterModelsByKeywords, getDefaultGroupName, getFancyProviderName } from '@renderer/utils'
import { isFreeModel } from '@renderer/utils/model'
import { Empty, Modal, Spin, Tabs } from 'antd'
import Input from 'antd/es/input/Input'
import { groupBy, isEmpty, uniqBy } from 'lodash'
import { debounce } from 'lodash'
import { ListMinus, ListPlus, RefreshCcw, Search } from 'lucide-react'

View File

@ -1,5 +1,6 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import { endpointTypeOptions } from '@renderer/config/endpointTypes'
import { isNotSupportedTextDelta } from '@renderer/config/models'
@ -9,7 +10,7 @@ import { useProvider } from '@renderer/hooks/useProvider'
import type { EndpointType, Model, Provider } from '@renderer/types'
import { getDefaultGroupName } from '@renderer/utils'
import type { FormProps } from 'antd'
import { Form, Input, Modal, Select } from 'antd'
import { Form, Modal, Select } from 'antd'
import { find } from 'lodash'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,4 +1,5 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import type { DropResult } from '@hello-pangea/dnd'
import { loggerService } from '@logger'
import {
@ -15,7 +16,7 @@ import type { Provider, ProviderType } from '@renderer/types'
import { isSystemProvider } from '@renderer/types'
import { getFancyProviderName, matchKeywordsInModel, matchKeywordsInProvider, uuid } from '@renderer/utils'
import type { MenuProps } from 'antd'
import { Dropdown, Input, Tag } from 'antd'
import { Dropdown, Tag } from 'antd'
import { GripVertical, PlusIcon, Search, UserPen } from 'lucide-react'
import type { FC } from 'react'
import { startTransition, useCallback, useEffect, useRef, useState } from 'react'

View File

@ -1,4 +1,5 @@
import { Button, Flex, RowFlex, Switch, Tooltip, WarnTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import OpenAIAlert from '@renderer/components/Alert/OpenAIAlert'
import { LoadingIcon } from '@renderer/components/Icons'
import { ApiKeyListPopup } from '@renderer/components/Popups/ApiKeyListPopup'
@ -38,7 +39,7 @@ import {
validateApiHost
} from '@renderer/utils'
import { formatErrorMessage } from '@renderer/utils/error'
import { Divider, Input, Select, Space } from 'antd'
import { Divider, Select, Space } from 'antd'
import Link from 'antd/es/typography/Link'
import { debounce, isEmpty } from 'lodash'
import { Bolt, Check, Settings2, SquareArrowOutUpRight } from 'lucide-react'

View File

@ -1,7 +1,8 @@
import { RowFlex } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { PROVIDER_URLS } from '@renderer/config/providers'
import { useVertexAISettings } from '@renderer/hooks/useVertexAI'
import { Alert, Input } from 'antd'
import { Alert } from 'antd'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,13 +1,14 @@
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { DraggableList } from '@renderer/components/DraggableList'
import { DeleteIcon, EditIcon } from '@renderer/components/Icons'
import { useTheme } from '@renderer/context/ThemeProvider'
import FileItem from '@renderer/pages/files/FileItem'
import QuickPhraseService from '@renderer/services/QuickPhraseService'
import type { QuickPhrase } from '@renderer/types'
import { Input, Modal, Popconfirm, Space } from 'antd'
import { Modal, Popconfirm, Space } from 'antd'
import { PlusIcon } from 'lucide-react'
import type { FC } from 'react'
import { useEffect, useState } from 'react'

View File

@ -1,7 +1,8 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import type { SelectionActionItem } from '@shared/data/preference/preferenceTypes'
import { Form, Input, Modal, Select } from 'antd'
import { Form, Modal, Select } from 'antd'
import { Globe } from 'lucide-react'
import type { FC } from 'react'
import { useEffect } from 'react'

View File

@ -1,10 +1,11 @@
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import ModelAvatar from '@renderer/components/Avatar/ModelAvatar'
import CopyButton from '@renderer/components/CopyButton'
import { useAssistants, useDefaultAssistant } from '@renderer/hooks/useAssistant'
import { getDefaultModel } from '@renderer/services/AssistantService'
import type { SelectionActionItem } from '@shared/data/preference/preferenceTypes'
import { Col, Input, Modal, Radio, Row, Select, Space } from 'antd'
import { Col, Modal, Radio, Row, Select, Space } from 'antd'
import { CircleHelp, Dices, OctagonX } from 'lucide-react'
import { DynamicIcon, iconNames } from 'lucide-react/dynamic'
import type { FC } from 'react'

View File

@ -1,6 +1,7 @@
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { isWin } from '@renderer/config/constant'
import { Form, Input, Modal } from 'antd'
import { Form, Modal } from 'antd'
import type { FC } from 'react'
import { useEffect } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { ClearOutlined, UndoOutlined } from '@ant-design/icons'
import { Button, RowFlex, Switch, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { isMac, isWin } from '@renderer/config/constant'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useShortcuts } from '@renderer/hooks/useShortcuts'
@ -9,7 +10,7 @@ import { useAppDispatch } from '@renderer/store'
import { initialState, resetShortcuts, toggleShortcut, updateShortcut } from '@renderer/store/shortcuts'
import type { Shortcut } from '@renderer/types'
import type { InputRef } from 'antd'
import { Input, Table as AntTable } from 'antd'
import { Table as AntTable } from 'antd'
import type { ColumnsType } from 'antd/es/table'
import type { FC } from 'react'
import React, { useRef, useState } from 'react'

View File

@ -1,12 +1,13 @@
// TODO: Refactor this component to use HeroUI
import { Button, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useTheme } from '@renderer/context/ThemeProvider'
import { useApiServer } from '@renderer/hooks/useApiServer'
import type { RootState } from '@renderer/store'
import { useAppDispatch } from '@renderer/store'
import { setApiServerApiKey, setApiServerPort } from '@renderer/store/settings'
import { formatErrorMessage } from '@renderer/utils/error'
import { Input, InputNumber, Typography } from 'antd'
import { InputNumber, Typography } from 'antd'
import { Copy, ExternalLink, Play, RotateCcw, Square } from 'lucide-react'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,10 +1,11 @@
import { Button, InfoTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import EmojiPicker from '@renderer/components/EmojiPicker'
import useTranslate from '@renderer/hooks/useTranslate'
import { addCustomLanguage, updateCustomLanguage } from '@renderer/services/TranslateService'
import type { CustomTranslateLanguage } from '@renderer/types'
import { Form, Input, Modal, Popover, Space } from 'antd'
import { Form, Modal, Popover, Space } from 'antd'
import type { FC } from 'react'
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,10 +1,10 @@
import { RedoOutlined } from '@ant-design/icons'
import { RowFlex } from '@cherrystudio/ui'
import { Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@data/hooks/usePreference'
import { useTheme } from '@renderer/context/ThemeProvider'
import { TRANSLATE_PROMPT } from '@shared/config/prompts'
import { Input } from 'antd'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -1,8 +1,9 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import type { FormProps } from 'antd'
import { Form, Input, Modal } from 'antd'
import { Form, Modal } from 'antd'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,7 +1,8 @@
import { InfoTooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { useWebSearchSettings } from '@renderer/hooks/useWebSearchProviders'
import { SettingRow, SettingRowTitle } from '@renderer/pages/settings'
import { Input, Select, Space } from 'antd'
import { Select, Space } from 'antd'
import { ChevronDown } from 'lucide-react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { CheckOutlined, ExportOutlined, LoadingOutlined } from '@ant-design/icons'
import { Button, Flex, InfoTooltip, RowFlex, Tooltip } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import BochaLogo from '@renderer/assets/images/search/bocha.webp'
import ExaLogo from '@renderer/assets/images/search/exa.png'
@ -13,7 +14,7 @@ import { useWebSearchProvider } from '@renderer/hooks/useWebSearchProviders'
import WebSearchService from '@renderer/services/WebSearchService'
import type { WebSearchProviderId } from '@renderer/types'
import { formatApiKeys, hasObjectKey } from '@renderer/utils'
import { Divider, Form, Input } from 'antd'
import { Divider, Form } from 'antd'
import Link from 'antd/es/typography/Link'
import { List } from 'lucide-react'
import type { FC } from 'react'

View File

@ -1,6 +1,7 @@
import { ImportOutlined, PlusOutlined } from '@ant-design/icons'
import { ColFlex, Flex, RowFlex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
import ListItem from '@renderer/components/ListItem'
import Scrollbar from '@renderer/components/Scrollbar'
@ -10,7 +11,7 @@ import { useNavbarPosition } from '@renderer/hooks/useNavbar'
import { createAssistantFromAgent } from '@renderer/services/AssistantService'
import type { AssistantPreset } from '@renderer/types'
import { uuid } from '@renderer/utils'
import { Empty, Input } from 'antd'
import { Empty } from 'antd'
import { omit } from 'lodash'
import { Search } from 'lucide-react'
import type { FC } from 'react'

View File

@ -2,6 +2,7 @@ import 'emoji-picker-element'
import { CheckOutlined, LoadingOutlined, RollbackOutlined, ThunderboltOutlined } from '@ant-design/icons'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@logger'
import EmojiPicker from '@renderer/components/EmojiPicker'
import { TopView } from '@renderer/components/TopView'
@ -15,7 +16,7 @@ import type { AssistantPreset, KnowledgeBase } from '@renderer/types'
import { getLeadingEmoji, uuid } from '@renderer/utils'
import { AGENT_PROMPT } from '@shared/config/prompts'
import type { FormInstance, SelectProps } from 'antd'
import { Form, Input, Modal, Popover, Select } from 'antd'
import { Form, Modal, Popover, Select } from 'antd'
import TextArea from 'antd/es/input/TextArea'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,5 +1,6 @@
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { TopView } from '@renderer/components/TopView'
import { useAssistantPresets } from '@renderer/hooks/useAssistantPresets'
import { useTimer } from '@renderer/hooks/useTimer'
@ -7,7 +8,7 @@ import { getDefaultModel } from '@renderer/services/AssistantService'
import { EVENT_NAMES, EventEmitter } from '@renderer/services/EventService'
import type { AssistantPreset } from '@renderer/types'
import { uuid } from '@renderer/utils'
import { Form, Input, Modal, Radio } from 'antd'
import { Form, Modal, Radio } from 'antd'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -2,12 +2,13 @@ import { DeleteOutlined, StarFilled, StarOutlined } from '@ant-design/icons'
import { ColFlex, RowFlex } from '@cherrystudio/ui'
import { Flex } from '@cherrystudio/ui'
import { Button } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { DynamicVirtualList } from '@renderer/components/VirtualList'
import db from '@renderer/databases'
import useTranslate from '@renderer/hooks/useTranslate'
import { clearHistory, deleteHistory, updateTranslateHistory } from '@renderer/services/TranslateService'
import type { TranslateHistory, TranslateLanguage } from '@renderer/types'
import { Drawer, Empty, Input, Popconfirm } from 'antd'
import { Drawer, Empty, Popconfirm } from 'antd'
import dayjs from 'dayjs'
import { useLiveQuery } from 'dexie-react-hooks'
import { isEmpty } from 'lodash'

View File

@ -1,9 +1,10 @@
import { Input } from '@cherrystudio/ui'
import { useCache, usePersistCache, useSharedCache } from '@renderer/data/hooks/useCache'
import { usePreference } from '@renderer/data/hooks/usePreference'
import { loggerService } from '@renderer/services/LoggerService'
import type { RendererPersistCacheKey } from '@shared/data/cache/cacheSchemas'
import { ThemeMode } from '@shared/data/preference/preferenceTypes'
import { Button, Card, Col, Divider, Input, message, Row, Select, Slider, Space, Typography } from 'antd'
import { Button, Card, Col, Divider, message, Row, Select, Slider, Space, Typography } from 'antd'
import { Database, Edit, Eye, HardDrive, RefreshCw, Users, Zap } from 'lucide-react'
import React, { useRef, useState } from 'react'
import styled from 'styled-components'

View File

@ -1,9 +1,10 @@
import { Input } from '@cherrystudio/ui'
import { cacheService } from '@renderer/data/CacheService'
import { usePreference } from '@renderer/data/hooks/usePreference'
import { loggerService } from '@renderer/services/LoggerService'
import type { RendererPersistCacheKey, RendererPersistCacheSchema } from '@shared/data/cache/cacheSchemas'
import { ThemeMode } from '@shared/data/preference/preferenceTypes'
import { Button, Card, Col, Divider, Input, message, Row, Select, Space, Typography } from 'antd'
import { Button, Card, Col, Divider, message, Row, Select, Space, Typography } from 'antd'
import { Clock, Database, Edit, Eye, Trash2, Zap } from 'lucide-react'
import React, { useEffect, useState } from 'react'
import styled from 'styled-components'

View File

@ -1,5 +1,6 @@
import { Input } from '@cherrystudio/ui'
import { loggerService } from '@renderer/services/LoggerService'
import { Alert, Button, Card, Col, Divider, Input, message, Row, Space, Table, Tag, Typography } from 'antd'
import { Alert, Button, Card, Col, Divider, message, Row, Space, Table, Tag, Typography } from 'antd'
import { Check, Database, Play, RotateCcw, X } from 'lucide-react'
import React, { useState } from 'react'
import styled from 'styled-components'

View File

@ -1,6 +1,7 @@
import { Input } from '@cherrystudio/ui'
import { prefetch, useInvalidateCache, useMutation, usePaginatedQuery, useQuery } from '@renderer/data/hooks/useDataApi'
import { loggerService } from '@renderer/services/LoggerService'
import { Alert, Button, Card, Col, Input, message, Row, Space, Spin, Table, Tag, Typography } from 'antd'
import { Alert, Button, Card, Col, message, Row, Space, Spin, Table, Tag, Typography } from 'antd'
import {
ArrowLeft,
ArrowRight,

View File

@ -1,7 +1,8 @@
import { Button, Switch } from '@cherrystudio/ui'
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@renderer/data/hooks/usePreference'
import { type PreferenceKeyType, ThemeMode } from '@shared/data/preference/preferenceTypes'
import { Input, message, Select, Slider, Space, Typography } from 'antd'
import { message, Select, Slider, Space, Typography } from 'antd'
import React, { useState } from 'react'
import styled from 'styled-components'

View File

@ -1,5 +1,6 @@
import { Input } from '@cherrystudio/ui'
import { useMultiplePreferences } from '@renderer/data/hooks/usePreference'
import { Button, Card, Input, message, Select, Slider, Space, Table, Typography } from 'antd'
import { Button, Card, message, Select, Slider, Space, Table, Typography } from 'antd'
import type { ColumnType } from 'antd/es/table'
import React, { useState } from 'react'
import styled from 'styled-components'

View File

@ -1,7 +1,8 @@
import { Input } from '@cherrystudio/ui'
import { usePreference } from '@renderer/data/hooks/usePreference'
import { preferenceService } from '@renderer/data/PreferenceService'
import { type PreferenceKeyType, ThemeMode } from '@shared/data/preference/preferenceTypes'
import { Button, Input, message, Space, Typography } from 'antd'
import { Button, message, Space, Typography } from 'antd'
import React, { useState } from 'react'
import styled from 'styled-components'

View File

@ -1,8 +1,7 @@
import { Input as CInput } from '@cherrystudio/ui'
import ModelAvatar from '@renderer/components/Avatar/ModelAvatar'
import { useTimer } from '@renderer/hooks/useTimer'
import type { Assistant } from '@renderer/types'
import { Input as AntdInput } from 'antd'
import type { InputRef } from 'rc-input/lib/interface'
import React, { useRef } from 'react'
import styled from 'styled-components'
@ -25,10 +24,10 @@ const InputBar = ({
handleKeyDown,
handleChange
}: InputBarProps & { ref?: React.RefObject<HTMLDivElement | null> }) => {
const inputRef = useRef<InputRef>(null)
const inputRef = useRef<HTMLInputElement>(null)
const { setTimeoutTimer } = useTimer()
if (!loading) {
setTimeoutTimer('focus', () => inputRef.current?.input?.focus(), 0)
setTimeoutTimer('focus', () => inputRef.current?.focus(), 0)
}
return (
<InputWrapper ref={ref}>
@ -53,7 +52,7 @@ const InputWrapper = styled.div`
margin-top: 10px;
`
const Input = styled(AntdInput)`
const Input = styled(CInput)`
background: none;
border: none;
-webkit-app-region: none;