chore: rename ground-left as ground-llm
This commit is contained in:
@@ -5,9 +5,9 @@ import IconFont from '@/components/icon-font';
|
||||
import SealInputNumber from '@/components/seal-form/input-number';
|
||||
import useOverlayScroller from '@/hooks/use-overlay-scroller';
|
||||
import useRequestToken from '@/hooks/use-request-token';
|
||||
import ResizeContainer from '@/pages/_components/terminal-tabs/resize-container';
|
||||
import {
|
||||
ClearOutlined,
|
||||
HolderOutlined,
|
||||
PlusOutlined,
|
||||
QuestionCircleOutlined,
|
||||
SendOutlined
|
||||
@@ -17,7 +17,6 @@ import { Button, Checkbox, Form, Segmented, Spin, Tabs, Tooltip } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import _ from 'lodash';
|
||||
import 'overlayscrollbars/overlayscrollbars.css';
|
||||
import { Resizable } from 're-resizable';
|
||||
import React, {
|
||||
forwardRef,
|
||||
useCallback,
|
||||
@@ -33,7 +32,7 @@ import { embeddingSamples } from '../config/samples';
|
||||
import { LLM_METAKEYS } from '../hooks/config';
|
||||
import useEmbeddingWorker from '../hooks/use-embedding-worker';
|
||||
import { useInitLLmMeta } from '../hooks/use-init-meta';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/rerank.less';
|
||||
import { generateEmbeddingCode } from '../view-code/embedding';
|
||||
import DynamicParams from './dynamic-params';
|
||||
@@ -132,7 +131,7 @@ const GroundEmbedding: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
setCollapse(!collapse);
|
||||
},
|
||||
calculateNewMaxFromBoundary: (maxWidth?: number, maxHeight?: number) => {
|
||||
resizeRef.current?.calculateNewMaxFromBoundary();
|
||||
resizeRef.current?.container?.calculateNewMaxFromBoundary();
|
||||
},
|
||||
collapse: collapse
|
||||
};
|
||||
@@ -259,8 +258,7 @@ const GroundEmbedding: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
};
|
||||
|
||||
const handleScaleResize = () => {
|
||||
console.log('handleScaleResize', resizeRef.current);
|
||||
const height = resizeRef.current?.state?.height;
|
||||
const height = resizeRef.current?.container?.state?.height;
|
||||
if (height) {
|
||||
setOutputHeight(height);
|
||||
}
|
||||
@@ -638,38 +636,11 @@ const GroundEmbedding: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
<Spin spinning={true}></Spin>
|
||||
</div>
|
||||
)}
|
||||
<Resizable
|
||||
<ResizeContainer
|
||||
ref={resizeRef}
|
||||
enable={{
|
||||
top: true
|
||||
}}
|
||||
defaultSize={{
|
||||
height: 180
|
||||
}}
|
||||
handleComponent={{
|
||||
top: (
|
||||
<Tooltip
|
||||
title={intl.formatMessage({
|
||||
id: 'playground.embedding.handler.tips'
|
||||
})}
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
className="drag-handler"
|
||||
color="default"
|
||||
variant="filled"
|
||||
icon={
|
||||
<HolderOutlined
|
||||
rotate={90}
|
||||
style={{ fontSize: 'var(--font-size-14)' }}
|
||||
/>
|
||||
}
|
||||
></Button>
|
||||
</Tooltip>
|
||||
)
|
||||
}}
|
||||
maxHeight={resizeMaxHeight}
|
||||
minHeight={180}
|
||||
defaultHeight={180}
|
||||
onResize={handleScaleResize}
|
||||
onResizeStop={handleScaleOutputSize}
|
||||
>
|
||||
@@ -689,7 +660,7 @@ const GroundEmbedding: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
items={outputItems}
|
||||
></Tabs>
|
||||
</div>
|
||||
</Resizable>
|
||||
</ResizeContainer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ import React, {
|
||||
import { CREAT_IMAGE_API } from '../apis';
|
||||
import { useInitImageMeta } from '../hooks/use-init-meta';
|
||||
import useTextImage from '../hooks/use-text-image';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { generateImageCode, generateOpenaiImageCode } from '../view-code/image';
|
||||
import DynamicParams from './dynamic-params';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import { MessageItem, MessageItemAction } from '../config/types';
|
||||
import { LLM_METAKEYS, llmInitialValues } from '../hooks/config';
|
||||
import useChatCompletion from '../hooks/use-chat-completion';
|
||||
import { useInitLLmMeta } from '../hooks/use-init-meta';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { generateLLMCode } from '../view-code/llm';
|
||||
import DynamicParams from './dynamic-params';
|
||||
@@ -38,7 +38,7 @@ import { rerankerSamples } from '../config/samples';
|
||||
import { ParamsSchema } from '../config/types';
|
||||
import { LLM_METAKEYS } from '../hooks/config';
|
||||
import { useInitLLmMeta } from '../hooks/use-init-meta';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/rerank.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { generateRerankCode } from '../view-code/rerank';
|
||||
|
||||
@@ -26,7 +26,7 @@ import React, {
|
||||
import { AUDIO_SPEECH_TO_TEXT_API, speechToText } from '../apis';
|
||||
import { SpeechToTextFormat, extractErrorMessage } from '../config';
|
||||
import { RealtimeParamsConfig as paramsConfig } from '../config/params-config';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/speech-to-text.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { speechToTextCode } from '../view-code/audio';
|
||||
|
||||
@@ -24,7 +24,7 @@ import { AUDIO_TEXT_TO_SPEECH_API, CHAT_API, textToSpeech } from '../apis';
|
||||
import { extractErrorMessage } from '../config';
|
||||
import { TTSParamsConfig as paramsConfig } from '../config/params-config';
|
||||
import { MessageItem, ParamsSchema } from '../config/types';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { TextToSpeechCode } from '../view-code/audio';
|
||||
import DynamicParams from './dynamic-params';
|
||||
|
||||
@@ -26,7 +26,7 @@ import { EDIT_IMAGE_API } from '../apis';
|
||||
import { EDIT_IMAGE_ACCEPT, scaleImageSize } from '../config';
|
||||
import { useInitImageMeta } from '../hooks/use-init-meta';
|
||||
import useTextImage from '../hooks/use-text-image';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/ground-llm.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import { generateImageCode, generateOpenaiImageCode } from '../view-code/image';
|
||||
import DynamicParams from './dynamic-params';
|
||||
|
||||
Reference in New Issue
Block a user