diff --git a/web/app/components/app/configuration/base/group-name/index.tsx b/web/app/components/app/configuration/base/group-name/index.tsx index 51fe09021b..d0316dd3eb 100644 --- a/web/app/components/app/configuration/base/group-name/index.tsx +++ b/web/app/components/app/configuration/base/group-name/index.tsx @@ -11,7 +11,7 @@ const GroupName: FC = ({ }) => { return (
-
{name}
+
{name}
= ({
{t('appDebug.promptMode.contextMissing')}
-
{t('common.operation.ok')}
+ >{t('common.operation.ok')}
) return ( -
-
+
+
{isContextMissing ? contextMissing : ( -
+
{isChatMode ? ( @@ -182,30 +184,30 @@ const AdvancedPromptInput: FC = ({
)}
{canDelete && ( - + )} {!isCopied ? ( - { + { copy(value) setIsCopied(true) }} /> ) : ( - + )}
)} -
{value.length}
+
{value.length}
)} hideResize={noResize} diff --git a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx index 922f8bb36a..faeea61a40 100644 --- a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx +++ b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx @@ -39,21 +39,17 @@ const ConfirmAddVar: FC = ({ }}>
{VarIcon}
-
{t('appDebug.autoAddVar')}
+
{t('appDebug.autoAddVar')}
{varNameArr.map(name => ( diff --git a/web/app/components/app/configuration/config-prompt/index.tsx b/web/app/components/app/configuration/config-prompt/index.tsx index 64870b7545..7b07643c02 100644 --- a/web/app/components/app/configuration/config-prompt/index.tsx +++ b/web/app/components/app/configuration/config-prompt/index.tsx @@ -8,6 +8,7 @@ import { } from '@remixicon/react' import { useTranslation } from 'react-i18next' import SimplePromptInput from './simple-prompt-input' +import Button from '@/app/components/base/button' import AdvancedMessageInput from '@/app/components/app/configuration/config-prompt/advanced-prompt-input' import { PromptRole } from '@/models/debug' import type { PromptItem, PromptVariable } from '@/models/debug' @@ -155,12 +156,12 @@ const Prompt: FC = ({ }
{(modelModeType === ModelModeType.chat && (currentAdvancedPrompt as PromptItem[]).length < MAX_PROMPT_MESSAGE_LENGTH) && ( -
- + className='mt-3 w-full'> +
{t('appDebug.promptMode.operation.addMessage')}
-
+ )}
) diff --git a/web/app/components/app/configuration/config-prompt/message-type-selector.tsx b/web/app/components/app/configuration/config-prompt/message-type-selector.tsx index d522292f76..16d993f2ea 100644 --- a/web/app/components/app/configuration/config-prompt/message-type-selector.tsx +++ b/web/app/components/app/configuration/config-prompt/message-type-selector.tsx @@ -29,7 +29,7 @@ const MessageTypeSelector: FC = ({
{showOption && ( -
+
{allTypes.map(type => (
= ({ setHide() onChange(type) }} - className='flex items-center h-9 min-w-[44px] px-3 rounded-lg cursor-pointer text-sm font-medium text-gray-700 uppercase hover:bg-gray-50' + className='flex items-center h-9 min-w-[44px] px-3 rounded-lg cursor-pointer text-sm font-medium text-text-secondary uppercase hover:bg-state-base-hover' >{type}
)) } diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx index 1987013698..eab2676e05 100644 --- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx +++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx @@ -6,7 +6,6 @@ import { useBoolean } from 'ahooks' import produce from 'immer' import { useContext } from 'use-context-selector' import ConfirmAddVar from './confirm-add-var' -import s from './style.module.css' import PromptEditorHeightResizeWrap from './prompt-editor-height-resize-wrap' import cn from '@/utils/classnames' import type { PromptVariable } from '@/models/debug' @@ -48,7 +47,6 @@ const Prompt: FC = ({ readonly = false, onChange, noTitle, - gradientBorder, editorHeight: initEditorHeight, noResize, }) => { @@ -161,12 +159,12 @@ const Prompt: FC = ({ const [editorHeight, setEditorHeight] = useState(minHeight) return ( -
-
+
+
{!noTitle && ( -
+
-
{mode !== AppType.completion ? t('appDebug.chatSubTitle') : t('appDebug.completionSubTitle')}
+
{mode !== AppType.completion ? t('appDebug.chatSubTitle') : t('appDebug.completionSubTitle')}
{!readonly && ( = ({ )} -
{promptTemplate.length}
+
+
{promptTemplate.length}
)} > diff --git a/web/app/components/app/configuration/config/automatic/automatic-btn.tsx b/web/app/components/app/configuration/config/automatic/automatic-btn.tsx index f70976082d..9cdb09fb03 100644 --- a/web/app/components/app/configuration/config/automatic/automatic-btn.tsx +++ b/web/app/components/app/configuration/config/automatic/automatic-btn.tsx @@ -2,7 +2,10 @@ import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' -import { Generator } from '@/app/components/base/icons/src/vender/other' +import { + RiSparklingFill, +} from '@remixicon/react' +import Button from '@/app/components/base/button' export type IAutomaticBtnProps = { onClick: () => void @@ -13,12 +16,10 @@ const AutomaticBtn: FC = ({ const { t } = useTranslation() return ( -
- - {t('appDebug.operation.automatic')} -
+ ) } export default React.memo(AutomaticBtn) diff --git a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx index 549421401c..36af6b52ae 100644 --- a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx +++ b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx @@ -38,7 +38,7 @@ import ModelName from '@/app/components/header/account-setting/model-provider-pa import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks' -export interface IGetAutomaticResProps { +export type IGetAutomaticResProps = { mode: AppType model: Model isShow: boolean @@ -54,11 +54,11 @@ const TryLabel: FC<{ }> = ({ Icon, text, onClick }) => { return (
- -
{text}
+ +
{text}
) } @@ -140,14 +140,14 @@ const GetAutomaticRes: FC = ({ const renderLoading = (
-
{t('appDebug.generate.loading')}
+
{t('appDebug.generate.loading')}
) const renderNoData = (
- -
+ +
{t('appDebug.generate.noDataLine1')}
{t('appDebug.generate.noDataLine2')}
@@ -193,10 +193,10 @@ const GetAutomaticRes: FC = ({ closable >
-
+
{t('appDebug.generate.title')}
-
{t('appDebug.generate.description')}
+
{t('appDebug.generate.description')}
= ({
-
{t('appDebug.generate.tryIt')}
+
{t('appDebug.generate.tryIt')}
@@ -232,7 +232,7 @@ const GetAutomaticRes: FC = ({ {/* inputs */}
-
{t('appDebug.generate.instruction')}
+
{t('appDebug.generate.instruction')}