fix: Web code build fails on ARM machines #2554 (#2557)

### What problem does this PR solve?

fix: Web code build fails on ARM machines #2554

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-09-24 15:27:26 +08:00 committed by GitHub
parent 7b3099b1a1
commit 832c90ac3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 28 deletions

View File

@ -30,7 +30,7 @@ export default defineConfig({
copy: ['src/conf.json'], copy: ['src/conf.json'],
proxy: { proxy: {
'/v1': { '/v1': {
target: 'http://127.0.0.1:9380/', target: 'http://127.0.0.1:9456/',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
logger: console, logger: console,

View File

@ -435,7 +435,7 @@ The above is the content you need to summarize.`,
'To play the voice using voice conversion, please select TTS (speech conversion model) in the settings first.', 'To play the voice using voice conversion, please select TTS (speech conversion model) in the settings first.',
relatedQuestion: 'Related question', relatedQuestion: 'Related question',
answerTitle: 'R', answerTitle: 'R',
multiTurn: 'Multi-trun optimization', multiTurn: 'Multi-turn optimization',
multiTurnTip: multiTurnTip:
'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.', 'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.',
}, },

View File

@ -17,7 +17,6 @@ import {
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Button, Space, Tooltip } from 'antd'; import { Button, Space, Tooltip } from 'antd';
import { useHandleDeleteFile } from '../hooks'; import { useHandleDeleteFile } from '../hooks';
import styles from './index.less';
interface IProps { interface IProps {
record: IFile; record: IFile;
@ -74,11 +73,7 @@ const ActionCell = ({
<Space size={0}> <Space size={0}>
{isKnowledgeBase || ( {isKnowledgeBase || (
<Tooltip title={t('addToKnowledge')}> <Tooltip title={t('addToKnowledge')}>
<Button <Button type="text" onClick={onShowConnectToKnowledgeModal}>
type="text"
className={styles.iconButton}
onClick={onShowConnectToKnowledgeModal}
>
<LinkOutlined size={20} /> <LinkOutlined size={20} />
</Button> </Button>
</Tooltip> </Tooltip>
@ -86,12 +81,7 @@ const ActionCell = ({
{isKnowledgeBase || ( {isKnowledgeBase || (
<Tooltip title={t('rename', { keyPrefix: 'common' })}> <Tooltip title={t('rename', { keyPrefix: 'common' })}>
<Button <Button type="text" disabled={beingUsed} onClick={onShowRenameModal}>
type="text"
disabled={beingUsed}
onClick={onShowRenameModal}
className={styles.iconButton}
>
<EditOutlined size={20} /> <EditOutlined size={20} />
</Button> </Button>
</Tooltip> </Tooltip>
@ -102,7 +92,6 @@ const ActionCell = ({
type="text" type="text"
disabled={beingUsed} disabled={beingUsed}
onClick={onShowMoveFileModal} onClick={onShowMoveFileModal}
className={styles.iconButton}
> >
<SvgIcon name={`move`} width={16}></SvgIcon> <SvgIcon name={`move`} width={16}></SvgIcon>
</Button> </Button>
@ -110,24 +99,14 @@ const ActionCell = ({
)} )}
{isKnowledgeBase || ( {isKnowledgeBase || (
<Tooltip title={t('delete', { keyPrefix: 'common' })}> <Tooltip title={t('delete', { keyPrefix: 'common' })}>
<Button <Button type="text" disabled={beingUsed} onClick={handleRemoveFile}>
type="text"
disabled={beingUsed}
onClick={handleRemoveFile}
className={styles.iconButton}
>
<DeleteOutlined size={20} /> <DeleteOutlined size={20} />
</Button> </Button>
</Tooltip> </Tooltip>
)} )}
{record.type !== 'folder' && ( {record.type !== 'folder' && (
<Tooltip title={t('download', { keyPrefix: 'common' })}> <Tooltip title={t('download', { keyPrefix: 'common' })}>
<Button <Button type="text" disabled={beingUsed} onClick={onDownloadDocument}>
type="text"
disabled={beingUsed}
onClick={onDownloadDocument}
className={styles.iconButton}
>
<DownloadOutlined size={20} /> <DownloadOutlined size={20} />
</Button> </Button>
</Tooltip> </Tooltip>
@ -139,7 +118,7 @@ const ActionCell = ({
color="black" color="black"
> >
<Tooltip title={t('preview')}> <Tooltip title={t('preview')}>
<Button type="text" className={styles.iconButton}> <Button type="text">
<EyeOutlined size={20} /> <EyeOutlined size={20} />
</Button> </Button>
</Tooltip> </Tooltip>