chore: replace components with core-ui, upgrade eslint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
import { StopOutlined } from '@ant-design/icons';
|
||||
import { IconFont } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button } from 'antd';
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import CopyButton from '@/components/copy-button';
|
||||
import UploadAudio from '@/components/upload-audio';
|
||||
import {
|
||||
audioTypeMap,
|
||||
convertFileToBase64,
|
||||
@@ -10,6 +8,7 @@ import {
|
||||
EditOutlined,
|
||||
MinusCircleOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { CopyButton, UploadAudio } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleAudio from '@/components/audio-player/simple-audio';
|
||||
import FullMarkdown from '@/components/markdown-viewer/full-markdown';
|
||||
import { FullMarkdown, SimpleAudio } from '@gpustack/core-ui';
|
||||
import { Input } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import _ from 'lodash';
|
||||
@@ -78,7 +77,7 @@ const MessageBody: React.FC<MessageBodyProps> = forwardRef(
|
||||
const imgPromises: Promise<string>[] = [];
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
let item = items[i];
|
||||
const item = items[i];
|
||||
|
||||
if (item.kind === 'file' && item.type.indexOf('image') !== -1) {
|
||||
const file = item.getAsFile();
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import IconFont from '@/components/icon-font';
|
||||
import OverlayScroller from '@/components/overlay-scroller';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import {
|
||||
ClearOutlined,
|
||||
DeleteOutlined,
|
||||
MoreOutlined,
|
||||
SettingOutlined
|
||||
} from '@ant-design/icons';
|
||||
import {
|
||||
AutoTooltip,
|
||||
BaseSelect,
|
||||
IconFont,
|
||||
OverlayScroller
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Checkbox, Dropdown, Popover, Spin } from 'antd';
|
||||
import _ from 'lodash';
|
||||
@@ -38,7 +40,6 @@ import ReferenceParams from '../reference-params';
|
||||
import ViewCommonCode from '../view-common-code';
|
||||
import MessageContent from './message-content';
|
||||
import SystemMessage from './system-message';
|
||||
|
||||
interface ModelItemProps {
|
||||
model: string;
|
||||
modelList: ModelSelectionItem[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import FullMarkdown from '@/components/markdown-viewer/full-markdown';
|
||||
import { FullMarkdown } from '@gpustack/core-ui';
|
||||
import React from 'react';
|
||||
import '../../style/think-content.less';
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ class ThinkParser {
|
||||
|
||||
parse(chunk: string) {
|
||||
while (this.lastCheckedIndex < chunk.length) {
|
||||
let startIndex = chunk.indexOf('<think>', this.lastCheckedIndex);
|
||||
let endIndex = chunk.indexOf('</think>', this.lastCheckedIndex);
|
||||
const startIndex = chunk.indexOf('<think>', this.lastCheckedIndex);
|
||||
const endIndex = chunk.indexOf('</think>', this.lastCheckedIndex);
|
||||
|
||||
if (!this.collecting) {
|
||||
if (endIndex !== -1 && (startIndex === -1 || endIndex < startIndex)) {
|
||||
|
||||
Reference in New Issue
Block a user