Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Fix frontend type error (#27116)
GuanMu8c298b33cd97
diff --git a/web/app/components/plugins/plugin-page/context.tsx b/web/app/components/plugins/plugin-page/context.tsxindex 52efbb263e4..cdf81af396b 100644--- a/web/app/components/plugins/plugin-page/context.tsx+++ b/web/app/components/plugins/plugin-page/context.tsx@@ -1,6 +1,6 @@'use client'-import type { ReactNode } from 'react'+import type { ReactNode, RefObject } from 'react'import {useMemo,useRef,@@ -17,7 +17,7 @@ import { PLUGIN_PAGE_TABS_MAP, usePluginPageTabs } from '../hooks'import { useGlobalPublicStore } from '@/context/global-public-context'export type PluginPageContextValue = {- containerRef: React.RefObject<HTMLDivElement>+ containerRef: RefObject<HTMLDivElement | null>currentPluginID: string | undefinedsetCurrentPluginID: (pluginID?: string) => voidfilters: FilterState@@ -27,8 +27,10 @@ export type PluginPageContextValue = {options: Array<{ value: string, text: string }>}+const emptyContainerRef: RefObject<HTMLDivElement | null> = { current: null }+export const PluginPageContext = createContext<PluginPageContextValue>({- containerRef: { current: null },+ containerRef: emptyContainerRef,currentPluginID: undefined,setCurrentPluginID: noop,filters: {@@ -53,7 +55,7 @@ export function usePluginPageContext(selector: (value: PluginPageContextValue) =export const PluginPageContextProvider = ({children,}: PluginPageContextProviderProps) => {- const containerRef = useRef<HTMLDivElement>(null)+ const containerRef = useRef<HTMLDivElement | null>(null)const [filters, setFilters] = useState<FilterState>({categories: [],tags: [],diff --git a/web/app/components/plugins/plugin-page/use-uploader.ts b/web/app/components/plugins/plugin-page/use-uploader.tsindex fb3974c4482..8ccaef6a135 100644--- a/web/app/components/plugins/plugin-page/use-uploader.ts+++ b/web/app/components/plugins/plugin-page/use-uploader.ts@@ -1,8 +1,9 @@import { useEffect, useRef, useState } from 'react'+import type { RefObject } from 'react'type UploaderHookProps = {onFileChange: (file: File | null) => void- containerRef: React.RefObject<HTMLDivElement>+ containerRef: RefObject<HTMLDivElement | null>enabled?: boolean}diff --git a/web/app/components/plugins/update-plugin/from-market-place.tsx b/web/app/components/plugins/update-plugin/from-market-place.tsxindex fd15d923be1..57c36f77d15 100644--- a/web/app/components/plugins/update-plugin/from-market-place.tsx+++ b/web/app/components/plugins/update-plugin/from-market-place.tsx@@ -21,7 +21,7 @@ const i18nPrefix = 'plugin.upgrade'type Props = {payload: UpdateFromMarketPlacePayload- pluginId: string+ pluginId?: stringonSave: () => voidonCancel: () => voidisShowDowngradeWarningModal?: boolean@@ -113,9 +113,11 @@ const UpdatePluginModal: FC<Props> = ({const { mutateAsync } = useRemoveAutoUpgrade()const invalidateReferenceSettings = useInvalidateReferenceSettings()const handleExcludeAndDownload = async () => {- await mutateAsync({- plugin_id: pluginId,- })+ if (pluginId) {+ await mutateAsync({+ plugin_id: pluginId,+ })+ }invalidateReferenceSettings()handleConfirm()}diff --git a/web/app/components/rag-pipeline/hooks/use-pipeline-run.ts b/web/app/components/rag-pipeline/hooks/use-pipeline-run.tsindex cf910d411bb..5e5f596bca7 100644--- a/web/app/components/rag-pipeline/hooks/use-pipeline-run.ts+++ b/web/app/components/rag-pipeline/hooks/use-pipeline-run.ts@@ -145,6 +145,9 @@ export const usePipelineRun = () => {} = workflowStore.getState()setWorkflowRunningData({result: {+ inputs_truncated: false,+ process_data_truncated: false,+ outputs_truncated: false,status: WorkflowRunningStatus.Running,},tracing: [],diff --git a/web/app/components/workflow-app/hooks/use-workflow-run.ts b/web/app/components/workflow-app/hooks/use-workflow-run.tsindex 72dc7fea2f9..35b53b14d1e 100644--- a/web/app/components/workflow-app/hooks/use-workflow-run.ts+++ b/web/app/components/workflow-app/hooks/use-workflow-run.ts@@ -164,6 +164,9 @@ export const useWorkflowRun = () => {} = workflowStore.getState()setWorkflowRunningData({result: {+ inputs_truncated: false,+ process_data_truncated: false,+ outputs_truncated: false,status: WorkflowRunningStatus.Running,},tracing: [],diff --git a/web/app/components/workflow-app/index.tsx b/web/app/components/workflow-app/index.tsxindex 68ed6013441..df83b3ca267 100644--- a/web/app/components/workflow-app/index.tsx+++ b/web/app/components/workflow-app/index.tsx@@ -86,7 +86,7 @@ const WorkflowAppWithAdditionalContext = () => {if (!parsedInputs)return- const userInputs: Record<string, string> = {}+ const userInputs: Record<string, string | number | boolean> = {}Object.entries(parsedInputs).forEach(([key, value]) => {if (key.startsWith('sys.'))returndiff --git a/web/app/components/workflow/block-selector/market-place-plugin/list.tsx b/web/app/components/workflow/block-selector/market-place-plugin/list.tsxindex 3e36d64fbb0..07ed17f86cd 100644--- a/web/app/components/workflow/block-selector/market-place-plugin/list.tsx+++ b/web/app/components/workflow/block-selector/market-place-plugin/list.tsx@@ -11,7 +11,7 @@ import { noop } from 'lodash-es'import { getMarketplaceUrl } from '@/utils/var'export type ListProps = {- wrapElemRef: React.RefObject<HTMLElement>+ wrapElemRef: React.RefObject<HTMLElement | null>list: Plugin[]searchText: stringtags: string[]