diff --git a/web/app/components/base/features/new-feature-panel/index.tsx b/web/app/components/base/features/new-feature-panel/index.tsx
index 517364e7ae..22a1f5a69f 100644
--- a/web/app/components/base/features/new-feature-panel/index.tsx
+++ b/web/app/components/base/features/new-feature-panel/index.tsx
@@ -61,7 +61,7 @@ const NewFeaturePanel = ({
{/* list */}
- {!isChatMode && (
+ {!isChatMode && !inWorkflow && (
)}
{isChatMode && (
@@ -72,20 +72,20 @@ const NewFeaturePanel = ({
onAutoAddPromptVariable={onAutoAddPromptVariable}
/>
)}
-
- {isChatMode && speech2textDefaultModel && (
-
- )}
- {text2speechDefaultModel && (
-
- )}
- {showFileUpload &&
}
{isChatMode && (
)}
+ {text2speechDefaultModel && (isChatMode || !inWorkflow) && (
+
+ )}
+ {isChatMode && speech2textDefaultModel && (
+
+ )}
+ {showFileUpload && isChatMode &&
}
{isChatMode && (
)}
+ {(isChatMode || !inWorkflow) &&
}
{!inWorkflow && isChatMode && (
)}
diff --git a/web/app/components/share/text-generation/run-once/index.tsx b/web/app/components/share/text-generation/run-once/index.tsx
index 89f235eee5..99aaf57a9f 100644
--- a/web/app/components/share/text-generation/run-once/index.tsx
+++ b/web/app/components/share/text-generation/run-once/index.tsx
@@ -14,6 +14,7 @@ import TextGenerationImageUploader from '@/app/components/base/image-uploader/te
import type { VisionFile, VisionSettings } from '@/types/app'
import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader'
import { getProcessedFiles } from '@/app/components/base/file-uploader/utils'
+// import { InputVarType } from '@/app/components/workflow/types'
export type IRunOnceProps = {
siteInfo: SiteInfo
diff --git a/web/app/components/workflow/header/index.tsx b/web/app/components/workflow/header/index.tsx
index 6649e29421..010d9ca1cd 100644
--- a/web/app/components/workflow/header/index.tsx
+++ b/web/app/components/workflow/header/index.tsx
@@ -4,6 +4,7 @@ import {
useCallback,
useMemo,
} from 'react'
+import { RiApps2AddLine } from '@remixicon/react'
import { useNodes } from 'reactflow'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
@@ -46,7 +47,7 @@ const Header: FC = () => {
const appSidebarExpand = useAppStore(s => s.appSidebarExpand)
const appID = appDetail?.id
const isChatMode = useIsChatMode()
- const { nodesReadOnly } = useNodesReadOnly()
+ const { nodesReadOnly, getNodesReadOnly } = useNodesReadOnly()
const publishedAt = useStore(s => s.publishedAt)
const draftUpdatedAt = useStore(s => s.draftUpdatedAt)
const toolPublished = useStore(s => s.toolPublished)
@@ -85,6 +86,17 @@ const Header: FC = () => {
viewHistory,
} = useWorkflowMode()
+ const handleShowFeatures = useCallback(() => {
+ const {
+ showFeaturesPanel,
+ isRestoring,
+ setShowFeaturesPanel,
+ } = workflowStore.getState()
+ if (getNodesReadOnly() && !isRestoring)
+ return
+ setShowFeaturesPanel(!showFeaturesPanel)
+ }, [workflowStore, getNodesReadOnly])
+
const handleCancelRestore = useCallback(() => {
handleLoadBackupDraft()
workflowStore.setState({ isRestoring: false })
@@ -161,6 +173,10 @@ const Header: FC = () => {
+
{
{
restoring && (
+
+