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
refactor(web): mark Props of tools/ components as read-only (#25219) (#37255)
Rohit Gahlawat50e23f40a449
diff --git a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsxindex dcbf834ede3..0c5c7620635 100644--- a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx@@ -23,12 +23,12 @@ import { useTranslation } from 'react-i18next'import { Infotip } from '@/app/components/base/infotip'import { AuthHeaderPrefix, AuthType } from '@/app/components/tools/types'-type Props = {+type Props = Readonly<{positionCenter?: booleancredential: CredentialonChange: (credential: Credential) => voidonHide: () => void-}+}>type ItemProps = {text: stringdiff --git a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsxindex b07d21ce146..a27b52e2a9c 100644--- a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx@@ -15,9 +15,9 @@ import Input from '@/app/components/base/input'import { importSchemaFromURL } from '@/service/tools'import examples from './examples'-type Props = {+type Props = Readonly<{onChange: (value: string) => void-}+}>const GetSchema: FC<Props> = ({onChange,diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsxindex 6806a78adae..ef3218bb570 100644--- a/web/app/components/tools/edit-custom-collection-modal/index.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx@@ -33,7 +33,7 @@ import ConfigCredentials from './config-credentials'import GetSchema from './get-schema'import TestApi from './test-api'-type Props = {+type Props = Readonly<{positionLeft?: booleandialogClassName?: stringpayload: any@@ -41,7 +41,7 @@ type Props = {onAdd?: (payload: CustomCollectionBackend) => voidonRemove?: () => voidonEdit?: (payload: CustomCollectionBackend) => void-}+}>// Add and Editconst EditCustomCollectionModal: FC<Props> = ({positionLeft,diff --git a/web/app/components/tools/edit-custom-collection-modal/test-api.tsx b/web/app/components/tools/edit-custom-collection-modal/test-api.tsxindex d53cab8c8ab..b438bf859e5 100644--- a/web/app/components/tools/edit-custom-collection-modal/test-api.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/test-api.tsx@@ -24,12 +24,12 @@ import { getLanguage } from '@/i18n-config/language'import { testAPIAvailable } from '@/service/tools'import ConfigCredentials from './config-credentials'-type Props = {+type Props = Readonly<{positionCenter?: booleancustomCollection: CustomCollectionBackendtool: CustomParamSchemaonHide: () => void-}+}>const TestApi: FC<Props> = ({positionCenter,diff --git a/web/app/components/tools/provider/custom-create-card.tsx b/web/app/components/tools/provider/custom-create-card.tsxindex 90c597de15b..0879d2cd0df 100644--- a/web/app/components/tools/provider/custom-create-card.tsx+++ b/web/app/components/tools/provider/custom-create-card.tsx@@ -10,9 +10,9 @@ import EditCustomToolModal from '@/app/components/tools/edit-custom-collection-mimport { useAppContext } from '@/context/app-context'import { createCustomCollection } from '@/service/tools'-type Props = {+type Props = Readonly<{onRefreshData: () => void-}+}>const Contribute = ({ onRefreshData }: Props) => {const { t } = useTranslation()diff --git a/web/app/components/tools/provider/detail.tsx b/web/app/components/tools/provider/detail.tsxindex ff64e0044cb..597c7b10978 100644--- a/web/app/components/tools/provider/detail.tsx+++ b/web/app/components/tools/provider/detail.tsx@@ -63,11 +63,11 @@ import { basePath } from '@/utils/var'import { AuthHeaderPrefix, AuthType, CollectionType } from '../types'import ToolItem from './tool-item'-type Props = {+type Props = Readonly<{collection: CollectiononHide: () => voidonRefreshData: () => void-}+}>const ProviderDetail = ({collection,diff --git a/web/app/components/tools/provider/empty.tsx b/web/app/components/tools/provider/empty.tsxindex 5d86708f572..5b98a2937ee 100644--- a/web/app/components/tools/provider/empty.tsx+++ b/web/app/components/tools/provider/empty.tsx@@ -7,10 +7,10 @@ import Link from '@/next/link'import { NoToolPlaceholder } from '../../base/icons/src/vender/other'import { ToolTypeEnum } from '../../workflow/block-selector/types'-type Props = {+type Props = Readonly<{type?: ToolTypeEnumisAgent?: boolean-}+}>const getLink = (type?: ToolTypeEnum) => {switch (type) {diff --git a/web/app/components/tools/provider/tool-item.tsx b/web/app/components/tools/provider/tool-item.tsxindex 83ffd465db1..09e52e34365 100644--- a/web/app/components/tools/provider/tool-item.tsx+++ b/web/app/components/tools/provider/tool-item.tsx@@ -7,13 +7,13 @@ import SettingBuiltInTool from '@/app/components/app/configuration/config/agent/import { useLocale } from '@/context/i18n'import { getLanguage } from '@/i18n-config/language'-type Props = {+type Props = Readonly<{disabled?: booleancollection: Collectiontool: ToolisBuiltIn: booleanisModel: boolean-}+}>const ToolItem = ({disabled,diff --git a/web/app/components/tools/setting/build-in/config-credentials.tsx b/web/app/components/tools/setting/build-in/config-credentials.tsxindex ed545720709..a7ef23657d9 100644--- a/web/app/components/tools/setting/build-in/config-credentials.tsx+++ b/web/app/components/tools/setting/build-in/config-credentials.tsx@@ -26,14 +26,14 @@ import Form from '@/app/components/header/account-setting/model-provider-page/moimport { fetchBuiltInToolCredential, fetchBuiltInToolCredentialSchema } from '@/service/tools'import { addDefaultValue, toolCredentialToFormSchemas } from '../../utils/to-form-schema'-type Props = {+type Props = Readonly<{collection: CollectiononCancel: () => voidonSaved: (value: Record<string, any>) => voidisHideRemoveBtn?: booleanonRemove?: () => voidisSaving?: boolean-}+}>const ConfigCredential: FC<Props> = ({collection,diff --git a/web/app/components/tools/workflow-tool/configure-button.tsx b/web/app/components/tools/workflow-tool/configure-button.tsxindex 0adc923e480..19dcf29dcf8 100644--- a/web/app/components/tools/workflow-tool/configure-button.tsx+++ b/web/app/components/tools/workflow-tool/configure-button.tsx@@ -7,7 +7,7 @@ import Loading from '@/app/components/base/loading'import { useRouter } from '@/next/navigation'import Divider from '../../base/divider'-type Props = {+type Props = Readonly<{disabled: booleanpublished: booleanisLoading: boolean@@ -15,7 +15,7 @@ type Props = {isCurrentWorkspaceManager: booleanonConfigure: () => voiddisabledReason?: string-}+}>const WorkflowToolConfigureButton = ({disabled,