{
+ if (app.mode === 'chat' && !detailState.detail)
+ getAppDetail()
+ }}
htmlContent={}
position="br"
trigger="click"
diff --git a/web/app/components/app-sidebar/app-info.tsx b/web/app/components/app-sidebar/app-info.tsx
index 9d9d38fb04..567f9796a9 100644
--- a/web/app/components/app-sidebar/app-info.tsx
+++ b/web/app/components/app-sidebar/app-info.tsx
@@ -177,7 +177,10 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
>
)}
{appDetail.mode === 'completion' && (
- {t('app.types.completion').toUpperCase()}
+ <>
+ {t('app.types.completion').toUpperCase()}
+ {(t('app.newApp.basic').toUpperCase())}
+ >
)}
{appDetail.mode === 'workflow' && (
{t('app.types.workflow').toUpperCase()}
@@ -213,7 +216,10 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
>
)}
{appDetail.mode === 'completion' && (
- {t('app.types.completion').toUpperCase()}
+ <>
+ {t('app.types.completion').toUpperCase()}
+ {(t('app.newApp.basic').toUpperCase())}
+ >
)}
{appDetail.mode === 'workflow' && (
{t('app.types.workflow').toUpperCase()}
diff --git a/web/app/components/app/configuration/index.tsx b/web/app/components/app/configuration/index.tsx
index 97ec479894..a5e0dbb7c7 100644
--- a/web/app/components/app/configuration/index.tsx
+++ b/web/app/components/app/configuration/index.tsx
@@ -441,7 +441,7 @@ const Configuration: FC = () => {
model_id: model.name,
mode: model.mode,
configs: {
- prompt_template: modelConfig.pre_prompt,
+ prompt_template: modelConfig.pre_prompt || '',
prompt_variables: userInputsFormToPromptVariables(
[
...modelConfig.user_input_form,
diff --git a/web/app/components/base/popover/index.tsx b/web/app/components/base/popover/index.tsx
index 26d17c4405..cf85926623 100644
--- a/web/app/components/base/popover/index.tsx
+++ b/web/app/components/base/popover/index.tsx
@@ -17,6 +17,7 @@ type IPopover = {
btnElement?: string | React.ReactNode
btnClassName?: string | ((open: boolean) => string)
manualClose?: boolean
+ onTriggerClick?: () => void
}
const timeoutDuration = 100
@@ -30,6 +31,7 @@ export default function CustomPopover({
className,
btnClassName,
manualClose,
+ onTriggerClick,
}: IPopover) {
const buttonRef = useRef(null)
const timeOutRef = useRef(null)
@@ -66,6 +68,10 @@ export default function CustomPopover({
? btnClassName
: btnClassName?.(open)
}`}
+ onClick={() => {
+ if (!open)
+ onTriggerClick && onTriggerClick()
+ }}
>
{btnElement}