{
@@ -108,4 +108,6 @@ const Flowchart = React.forwardRef((props: {
)
})
+Flowchart.displayName = 'Flowchart'
+
export default Flowchart
diff --git a/web/app/components/base/popover/index.tsx b/web/app/components/base/popover/index.tsx
index 1e7ba76269..8dd20efd7c 100644
--- a/web/app/components/base/popover/index.tsx
+++ b/web/app/components/base/popover/index.tsx
@@ -34,15 +34,15 @@ export default function CustomPopover({
disabled = false,
}: IPopover) {
const buttonRef = useRef
(null)
- const timeOutRef = useRef(null)
+ const timeOutRef = useRef(null)
const onMouseEnter = (isOpen: boolean) => {
- timeOutRef.current && clearTimeout(timeOutRef.current)
+ timeOutRef.current && window.clearTimeout(timeOutRef.current)
!isOpen && buttonRef.current?.click()
}
const onMouseLeave = (isOpen: boolean) => {
- timeOutRef.current = setTimeout(() => {
+ timeOutRef.current = window.setTimeout(() => {
isOpen && buttonRef.current?.click()
}, timeoutDuration)
}
diff --git a/web/app/components/base/prompt-editor/plugins/custom-text/node.tsx b/web/app/components/base/prompt-editor/plugins/custom-text/node.tsx
index 5df4894c6b..49f4a056db 100644
--- a/web/app/components/base/prompt-editor/plugins/custom-text/node.tsx
+++ b/web/app/components/base/prompt-editor/plugins/custom-text/node.tsx
@@ -1,4 +1,4 @@
-import type { EditorConfig, NodeKey, SerializedTextNode } from 'lexical'
+import type { EditorConfig, SerializedTextNode } from 'lexical'
import { $createTextNode, TextNode } from 'lexical'
export class CustomTextNode extends TextNode {
@@ -10,9 +10,9 @@ export class CustomTextNode extends TextNode {
return new CustomTextNode(node.__text, node.__key)
}
- constructor(text: string, key?: NodeKey) {
- super(text, key)
- }
+ // constructor(text: string, key?: NodeKey) {
+ // super(text, key)
+ // }
createDOM(config: EditorConfig) {
const dom = super.createDOM(config)
diff --git a/web/app/components/base/prompt-editor/plugins/variable-value-block/node.tsx b/web/app/components/base/prompt-editor/plugins/variable-value-block/node.tsx
index 163d4bfac4..34487b257c 100644
--- a/web/app/components/base/prompt-editor/plugins/variable-value-block/node.tsx
+++ b/web/app/components/base/prompt-editor/plugins/variable-value-block/node.tsx
@@ -1,7 +1,6 @@
import type {
EditorConfig,
LexicalNode,
- NodeKey,
SerializedTextNode,
} from 'lexical'
import {
@@ -18,9 +17,9 @@ export class VariableValueBlockNode extends TextNode {
return new VariableValueBlockNode(node.__text, node.__key)
}
- constructor(text: string, key?: NodeKey) {
- super(text, key)
- }
+ // constructor(text: string, key?: NodeKey) {
+ // super(text, key)
+ // }
createDOM(config: EditorConfig): HTMLElement {
const element = super.createDOM(config)
diff --git a/web/app/components/base/tag-management/index.tsx b/web/app/components/base/tag-management/index.tsx
index 9a747910d2..5921d3da31 100644
--- a/web/app/components/base/tag-management/index.tsx
+++ b/web/app/components/base/tag-management/index.tsx
@@ -30,7 +30,7 @@ const TagManagementModal = ({ show, type }: TagManagementModalProps) => {
setTagList(res)
}
- const [pending, setPending] = useState(false)
+ const [pending, setPending] = useState(false)
const [name, setName] = useState('')
const createNewTag = async () => {
if (!name)
diff --git a/web/app/components/base/tag-management/selector.tsx b/web/app/components/base/tag-management/selector.tsx
index fd271a82e8..fca8ba1859 100644
--- a/web/app/components/base/tag-management/selector.tsx
+++ b/web/app/components/base/tag-management/selector.tsx
@@ -54,7 +54,7 @@ const Panel = (props: PanelProps) => {
return tagList.filter(tag => tag.type === type && !value.includes(tag.id) && tag.name.includes(keywords))
}, [type, tagList, value, keywords])
- const [creating, setCreating] = useState(false)
+ const [creating, setCreating] = useState(false)
const createNewTag = async () => {
if (!keywords)
return
diff --git a/web/app/components/base/tag-management/tag-item-editor.tsx b/web/app/components/base/tag-management/tag-item-editor.tsx
index 3735695302..0605f28cf6 100644
--- a/web/app/components/base/tag-management/tag-item-editor.tsx
+++ b/web/app/components/base/tag-management/tag-item-editor.tsx
@@ -78,7 +78,7 @@ const TagItemEditor: FC = ({
}
}
const [showRemoveModal, setShowRemoveModal] = useState(false)
- const [pending, setPending] = useState(false)
+ const [pending, setPending] = useState(false)
const removeTag = async (tagID: string) => {
if (pending)
return
diff --git a/web/app/components/datasets/create/step-one/index.tsx b/web/app/components/datasets/create/step-one/index.tsx
index 643932e9ae..7450e7f618 100644
--- a/web/app/components/datasets/create/step-one/index.tsx
+++ b/web/app/components/datasets/create/step-one/index.tsx
@@ -21,7 +21,7 @@ import VectorSpaceFull from '@/app/components/billing/vector-space-full'
type IStepOneProps = {
datasetId?: string
dataSourceType?: DataSourceType
- dataSourceTypeDisable: Boolean
+ dataSourceTypeDisable: boolean
hasConnection: boolean
onSetting: () => void
files: FileItem[]
diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx
index 5d92e30deb..047caec78d 100644
--- a/web/app/components/datasets/create/step-two/index.tsx
+++ b/web/app/components/datasets/create/step-two/index.tsx
@@ -28,7 +28,7 @@ import Loading from '@/app/components/base/loading'
import FloatRightContainer from '@/app/components/base/float-right-container'
import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-method-config'
import EconomicalRetrievalMethodConfig from '@/app/components/datasets/common/economical-retrieval-method-config'
-import { type RetrievalConfig } from '@/types/app'
+import type { RetrievalConfig } from '@/types/app'
import { ensureRerankModelSelected, isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'
import Toast from '@/app/components/base/toast'
import { formatNumber } from '@/utils/format'
@@ -202,7 +202,7 @@ const StepTwo = ({
}
const fetchFileIndexingEstimate = async (docForm = DocForm.TEXT, language?: string) => {
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
const res = await didFetchFileIndexingEstimate(getFileIndexingEstimateParams(docForm, language)!)
if (segmentationType === SegmentType.CUSTOM)
setCustomFileIndexingEstimate(res)
@@ -344,7 +344,7 @@ const StepTwo = ({
doc_form: docForm,
doc_language: docLanguage,
process_rule: getProcessRule(),
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
retrieval_model: retrievalConfig, // Readonly. If want to changed, just go to settings page.
embedding_model: embeddingModel.model, // Readonly
embedding_model_provider: embeddingModel.provider, // Readonly
@@ -357,7 +357,7 @@ const StepTwo = ({
rerankDefaultModel,
isRerankDefaultModelValid: !!isRerankDefaultModelValid,
rerankModelList,
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
retrievalConfig,
indexMethod: indexMethod as string,
})
@@ -367,7 +367,7 @@ const StepTwo = ({
}
const postRetrievalConfig = ensureRerankModelSelected({
rerankDefaultModel: rerankDefaultModel!,
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
retrievalConfig,
indexMethod: indexMethod as string,
})
diff --git a/web/app/components/datasets/external-api/external-api-modal/Form.tsx b/web/app/components/datasets/external-api/external-api-modal/Form.tsx
index ada01493fe..824b5e6c9e 100644
--- a/web/app/components/datasets/external-api/external-api-modal/Form.tsx
+++ b/web/app/components/datasets/external-api/external-api-modal/Form.tsx
@@ -87,4 +87,6 @@ const Form: FC = React.memo(({
)
})
+Form.displayName = 'Form'
+
export default Form
diff --git a/web/app/components/datasets/settings/form/index.tsx b/web/app/components/datasets/settings/form/index.tsx
index fa8c8de62e..4039873080 100644
--- a/web/app/components/datasets/settings/form/index.tsx
+++ b/web/app/components/datasets/settings/form/index.tsx
@@ -18,7 +18,7 @@ import { ApiConnectionMod } from '@/app/components/base/icons/src/vender/solid/d
import { updateDatasetSetting } from '@/service/datasets'
import type { DataSetListResponse } from '@/models/datasets'
import DatasetDetailContext from '@/context/dataset-detail'
-import { type RetrievalConfig } from '@/types/app'
+import type { RetrievalConfig } from '@/types/app'
import { useAppContext } from '@/context/app-context'
import { ensureRerankModelSelected, isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'
import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'
diff --git a/web/app/components/header/app-nav/index.tsx b/web/app/components/header/app-nav/index.tsx
index d4dd9e3ffd..3ac57926e9 100644
--- a/web/app/components/header/app-nav/index.tsx
+++ b/web/app/components/header/app-nav/index.tsx
@@ -11,7 +11,7 @@ import {
RiRobot2Line,
} from '@remixicon/react'
import Nav from '../nav'
-import { type NavItem } from '../nav/nav-selector'
+import type { NavItem } from '../nav/nav-selector'
import { fetchAppList } from '@/service/apps'
import CreateAppTemplateDialog from '@/app/components/app/create-app-dialog'
import CreateAppModal from '@/app/components/app/create-app-modal'
diff --git a/web/app/components/share/text-generation/index.tsx b/web/app/components/share/text-generation/index.tsx
index a2f6864242..61927e3ff3 100644
--- a/web/app/components/share/text-generation/index.tsx
+++ b/web/app/components/share/text-generation/index.tsx
@@ -132,9 +132,9 @@ const TextGeneration: FC = ({
const handleSend = () => {
setIsCallBatchAPI(false)
setControlSend(Date.now())
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
setAllTaskList([]) // clear batch task running status
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
showResSidebar()
}
@@ -314,7 +314,7 @@ const TextGeneration: FC = ({
setControlSend(Date.now())
// clear run once task status
setControlStopResponding(Date.now())
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
showResSidebar()
}
const handleCompleted = (completionRes: string, taskId?: number, isSuccess?: boolean) => {
diff --git a/web/app/components/tools/workflow-tool/index.tsx b/web/app/components/tools/workflow-tool/index.tsx
index 54751a384a..efd01255cf 100644
--- a/web/app/components/tools/workflow-tool/index.tsx
+++ b/web/app/components/tools/workflow-tool/index.tsx
@@ -37,7 +37,7 @@ const WorkflowToolAsModal: FC = ({
}) => {
const { t } = useTranslation()
- const [showEmojiPicker, setShowEmojiPicker] = useState(false)
+ const [showEmojiPicker, setShowEmojiPicker] = useState(false)
const [emoji, setEmoji] = useState(payload.icon)
const [label, setLabel] = useState(payload.label)
const [name, setName] = useState(payload.name)
diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts
index 89ba4e5cf9..dacd16f735 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts
+++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts
@@ -582,7 +582,7 @@ export const getNodeUsedVars = (node: Node): ValueSelector[] => {
break
}
case BlockEnum.LLM: {
- const payload = (data as LLMNodeType)
+ const payload = data as LLMNodeType
const isChatModel = payload.model?.mode === 'chat'
let prompts: string[] = []
if (isChatModel) {
@@ -620,19 +620,19 @@ export const getNodeUsedVars = (node: Node): ValueSelector[] => {
break
}
case BlockEnum.QuestionClassifier: {
- const payload = (data as QuestionClassifierNodeType)
+ const payload = data as QuestionClassifierNodeType
res = [payload.query_variable_selector]
const varInInstructions = matchNotSystemVars([payload.instruction || ''])
res.push(...varInInstructions)
break
}
case BlockEnum.HttpRequest: {
- const payload = (data as HttpNodeType)
+ const payload = data as HttpNodeType
res = matchNotSystemVars([payload.url, payload.headers, payload.params, payload.body.data])
break
}
case BlockEnum.Tool: {
- const payload = (data as ToolNodeType)
+ const payload = data as ToolNodeType
const mixVars = matchNotSystemVars(Object.keys(payload.tool_parameters)?.filter(key => payload.tool_parameters[key].type === ToolVarType.mixed).map(key => payload.tool_parameters[key].value) as string[])
const vars = Object.keys(payload.tool_parameters).filter(key => payload.tool_parameters[key].type === ToolVarType.variable).map(key => payload.tool_parameters[key].value as string) || []
res = [...(mixVars as ValueSelector[]), ...(vars as any)]
@@ -650,7 +650,7 @@ export const getNodeUsedVars = (node: Node): ValueSelector[] => {
}
case BlockEnum.ParameterExtractor: {
- const payload = (data as ParameterExtractorNodeType)
+ const payload = data as ParameterExtractorNodeType
res = [payload.query]
const varInInstructions = matchNotSystemVars([payload.instruction || ''])
res.push(...varInInstructions)
@@ -672,7 +672,7 @@ export const getNodeUsedVarPassToServerKey = (node: Node, valueSelector: ValueSe
let res: string | string[] = ''
switch (type) {
case BlockEnum.LLM: {
- const payload = (data as LLMNodeType)
+ const payload = data as LLMNodeType
res = [`#${valueSelector.join('.')}#`]
if (payload.context?.variable_selector.join('.') === valueSelector.join('.'))
res.push('#context#')
diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx
index fdd37d0518..43424aa936 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx
+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx
@@ -127,7 +127,7 @@ const Item: FC = ({
zIndex: 100,
}}>
{isObj && (
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
= {
[BlockEnum.LLM]: checkLLMValid,
[BlockEnum.KnowledgeRetrieval]: checkKnowledgeRetrievalValid,
diff --git a/web/app/components/workflow/nodes/_base/hooks/use-output-var-list.ts b/web/app/components/workflow/nodes/_base/hooks/use-output-var-list.ts
index c7bce2ef07..f0cb80bbc4 100644
--- a/web/app/components/workflow/nodes/_base/hooks/use-output-var-list.ts
+++ b/web/app/components/workflow/nodes/_base/hooks/use-output-var-list.ts
@@ -1,7 +1,7 @@
import { useCallback, useState } from 'react'
import produce from 'immer'
import { useBoolean } from 'ahooks'
-import { type OutputVar } from '../../code/types'
+import type { OutputVar } from '../../code/types'
import type { ValueSelector } from '@/app/components/workflow/types'
import { VarType } from '@/app/components/workflow/types'
import {
diff --git a/web/app/components/workflow/nodes/assigner/node.tsx b/web/app/components/workflow/nodes/assigner/node.tsx
index 72745a488a..e95c1dcc27 100644
--- a/web/app/components/workflow/nodes/assigner/node.tsx
+++ b/web/app/components/workflow/nodes/assigner/node.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import { useNodes } from 'reactflow'
import { useTranslation } from 'react-i18next'
import NodeVariableItem from '../variable-assigner/components/node-variable-item'
-import { type AssignerNodeType } from './types'
+import type { AssignerNodeType } from './types'
import { isConversationVar, isENV, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils'
import { BlockEnum, type Node, type NodeProps } from '@/app/components/workflow/types'
diff --git a/web/app/components/workflow/nodes/assigner/panel.tsx b/web/app/components/workflow/nodes/assigner/panel.tsx
index ff5a6420f3..213f9a05e7 100644
--- a/web/app/components/workflow/nodes/assigner/panel.tsx
+++ b/web/app/components/workflow/nodes/assigner/panel.tsx
@@ -8,7 +8,7 @@ import useConfig from './use-config'
import { WriteMode } from './types'
import type { AssignerNodeType } from './types'
import Field from '@/app/components/workflow/nodes/_base/components/field'
-import { type NodePanelProps } from '@/app/components/workflow/types'
+import type { NodePanelProps } from '@/app/components/workflow/types'
import cn from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.assigner'
diff --git a/web/app/components/workflow/nodes/end/default.ts b/web/app/components/workflow/nodes/end/default.ts
index ceeda5b43b..d144a079cf 100644
--- a/web/app/components/workflow/nodes/end/default.ts
+++ b/web/app/components/workflow/nodes/end/default.ts
@@ -1,6 +1,6 @@
import { BlockEnum } from '../../types'
import type { NodeDefault } from '../../types'
-import { type EndNodeType } from './types'
+import type { EndNodeType } from './types'
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants'
const nodeDefault: NodeDefault = {
diff --git a/web/app/components/workflow/nodes/end/panel.tsx b/web/app/components/workflow/nodes/end/panel.tsx
index a74ba51b6d..fc5e498d13 100644
--- a/web/app/components/workflow/nodes/end/panel.tsx
+++ b/web/app/components/workflow/nodes/end/panel.tsx
@@ -1,4 +1,4 @@
-import { type FC } from 'react'
+import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import useConfig from './use-config'
@@ -6,7 +6,7 @@ import type { EndNodeType } from './types'
import VarList from '@/app/components/workflow/nodes/_base/components/variable/var-list'
import Field from '@/app/components/workflow/nodes/_base/components/field'
import AddButton from '@/app/components/base/button/add-button'
-import { type NodePanelProps } from '@/app/components/workflow/types'
+import type { NodePanelProps } from '@/app/components/workflow/types'
const i18nPrefix = 'workflow.nodes.end'
diff --git a/web/app/components/workflow/nodes/http/components/edit-body/index.tsx b/web/app/components/workflow/nodes/http/components/edit-body/index.tsx
index 6e8f4eac3b..3b8306199a 100644
--- a/web/app/components/workflow/nodes/http/components/edit-body/index.tsx
+++ b/web/app/components/workflow/nodes/http/components/edit-body/index.tsx
@@ -54,7 +54,7 @@ const EditBody: FC = ({
type: newType,
data: '',
})
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
setBody([])
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [onChange])
diff --git a/web/app/components/workflow/nodes/tool/use-config.ts b/web/app/components/workflow/nodes/tool/use-config.ts
index df8ad47985..2d603c99e5 100644
--- a/web/app/components/workflow/nodes/tool/use-config.ts
+++ b/web/app/components/workflow/nodes/tool/use-config.ts
@@ -162,7 +162,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
const [inputVarValues, doSetInputVarValues] = useState>({})
const setInputVarValues = (value: Record) => {
doSetInputVarValues(value)
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ // eslint-disable-next-line ts/no-use-before-define
setRunInputData(value)
}
// fill single run form variable with constant value first time
diff --git a/web/app/components/workflow/nodes/variable-assigner/panel.tsx b/web/app/components/workflow/nodes/variable-assigner/panel.tsx
index 6152e0f5b8..b25e2656ed 100644
--- a/web/app/components/workflow/nodes/variable-assigner/panel.tsx
+++ b/web/app/components/workflow/nodes/variable-assigner/panel.tsx
@@ -7,7 +7,7 @@ import useConfig from './use-config'
import type { VariableAssignerNodeType } from './types'
import VarGroupItem from './components/var-group-item'
import cn from '@/utils/classnames'
-import { type NodePanelProps } from '@/app/components/workflow/types'
+import type { NodePanelProps } from '@/app/components/workflow/types'
import Split from '@/app/components/workflow/nodes/_base/components/split'
import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'
import Switch from '@/app/components/base/switch'
diff --git a/web/app/signin/_header.tsx b/web/app/signin/_header.tsx
index a9479a3fe4..9d03f18ac4 100644
--- a/web/app/signin/_header.tsx
+++ b/web/app/signin/_header.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import { useContext } from 'use-context-selector'
import Select from '@/app/components/base/select/locale'
import { languages } from '@/i18n/language'
-import { type Locale } from '@/i18n'
+import type { Locale } from '@/i18n'
import I18n from '@/context/i18n'
import LogoSite from '@/app/components/base/logo/logo-site'
diff --git a/web/context/modal-context.tsx b/web/context/modal-context.tsx
index 727268a29a..813f811a28 100644
--- a/web/context/modal-context.tsx
+++ b/web/context/modal-context.tsx
@@ -78,7 +78,6 @@ export const useModalContext = () => useContext(ModalContext)
// Adding a dangling comma to avoid the generic parsing issue in tsx, see:
// https://github.com/microsoft/TypeScript/issues/15713
-// eslint-disable-next-line @typescript-eslint/comma-dangle
export const useModalContextSelector = (selector: (state: ModalContextState) => T): T =>
useContextSelector(ModalContext, selector)
diff --git a/web/context/provider-context.tsx b/web/context/provider-context.tsx
index 75747ba79c..814792ef0e 100644
--- a/web/context/provider-context.tsx
+++ b/web/context/provider-context.tsx
@@ -70,7 +70,6 @@ export const useProviderContext = () => useContext(ProviderContext)
// Adding a dangling comma to avoid the generic parsing issue in tsx, see:
// https://github.com/microsoft/TypeScript/issues/15713
-// eslint-disable-next-line @typescript-eslint/comma-dangle
export const useProviderContextSelector = (selector: (state: ProviderContextState) => T): T =>
useContextSelector(ProviderContext, selector)
diff --git a/web/i18n/hi-IN/share-app.ts b/web/i18n/hi-IN/share-app.ts
index a5c7816fe2..74c23f8fda 100644
--- a/web/i18n/hi-IN/share-app.ts
+++ b/web/i18n/hi-IN/share-app.ts
@@ -3,6 +3,8 @@ const translation = {
welcome: 'आपका स्वागत है',
appUnavailable: 'ऐप उपलब्ध नहीं है',
appUnknownError: 'अज्ञात त्रुटि, कृपया पुनः प्रयास करें',
+ // @ts-expect-error TODO: fix this
+ // eslint-disable-next-line no-dupe-keys
appUnknownError: 'ऐप अनुपलब्ध है',
},
chat: {
diff --git a/web/service/base.ts b/web/service/base.ts
index fbdd5c1fd3..f43a23df52 100644
--- a/web/service/base.ts
+++ b/web/service/base.ts
@@ -559,7 +559,8 @@ export const ssePost = (
}
onData?.(str, isFirstMessage, moreInfo)
}, onCompleted, onThought, onMessageEnd, onMessageReplace, onFile, onWorkflowStarted, onWorkflowFinished, onNodeStarted, onNodeFinished, onIterationStart, onIterationNext, onIterationFinish, onParallelBranchStarted, onParallelBranchFinished, onTextChunk, onTTSChunk, onTTSEnd, onTextReplace)
- }).catch((e) => {
+ })
+ .catch((e) => {
if (e.toString() !== 'AbortError: The user aborted a request.' && !e.toString().errorMessage.includes('TypeError: Cannot assign to read only property'))
Toast.notify({ type: 'error', message: e })
onError?.(e)