diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx index 88c37d0b12..bc724c1449 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx @@ -117,7 +117,6 @@ const Panel: FC = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []) - const [isFold, setFold] = useState(false) const [controlShowPopup, setControlShowPopup] = useState(0) const showPopup = useCallback(() => { setControlShowPopup(Date.now()) diff --git a/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx b/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx index 63788447de..8e88a4b5f3 100644 --- a/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx +++ b/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx @@ -79,7 +79,7 @@ const EditItem: FC = ({ {!readonly && (
{ + onClick={() => { setIsEdit(true) }} > diff --git a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx index bfe5137965..f08f2ffc69 100644 --- a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx +++ b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx @@ -24,7 +24,7 @@ const ConfirmAddVar: FC = ({ varNameArr, onConfrim, onCancel, - onHide, + // onHide, }) => { const { t } = useTranslation() const mainContentRef = useRef(null) diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx index 628e8c68d6..adcfcdd126 100644 --- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx +++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx @@ -69,7 +69,6 @@ const Prompt: FC = ({ hasSetBlockStatus, showSelectDataSet, externalDataToolsConfig, - isAgent, } = useContext(ConfigContext) const { notify } = useToastContext() const { setShowExternalDataToolModal } = useModalContext() diff --git a/web/app/components/app/overview/appCard.tsx b/web/app/components/app/overview/appCard.tsx index ccf1f8ef1a..ea0b793857 100644 --- a/web/app/components/app/overview/appCard.tsx +++ b/web/app/components/app/overview/appCard.tsx @@ -53,7 +53,7 @@ function AppCard({ }: IAppCardProps) { const router = useRouter() const pathname = usePathname() - const { currentWorkspace, isCurrentWorkspaceManager, isCurrentWorkspaceEditor } = useAppContext() + const { isCurrentWorkspaceManager, isCurrentWorkspaceEditor } = useAppContext() const [showSettingsModal, setShowSettingsModal] = useState(false) const [showEmbedded, setShowEmbedded] = useState(false) const [showCustomizeModal, setShowCustomizeModal] = useState(false) diff --git a/web/app/components/base/agent-log-modal/result.tsx b/web/app/components/base/agent-log-modal/result.tsx index 691a611f36..7cba63ba95 100644 --- a/web/app/components/base/agent-log-modal/result.tsx +++ b/web/app/components/base/agent-log-modal/result.tsx @@ -21,7 +21,6 @@ type ResultPanelProps = { } const ResultPanel: FC = ({ - status, elapsed_time, total_tokens, error, diff --git a/web/app/components/base/block-input/index.tsx b/web/app/components/base/block-input/index.tsx index f2b6b5d6dc..79ff646bd1 100644 --- a/web/app/components/base/block-input/index.tsx +++ b/web/app/components/base/block-input/index.tsx @@ -49,8 +49,6 @@ const BlockInput: FC = ({ setCurrentValue(value) }, [value]) - const isContentChanged = value !== currentValue - const contentEditableRef = useRef(null) const [isEditing, setIsEditing] = useState(false) useEffect(() => { diff --git a/web/app/components/base/chat/chat/thought/index.tsx b/web/app/components/base/chat/chat/thought/index.tsx index 10bc8394e5..768f432e85 100644 --- a/web/app/components/base/chat/chat/thought/index.tsx +++ b/web/app/components/base/chat/chat/thought/index.tsx @@ -1,14 +1,10 @@ 'use client' import type { FC } from 'react' import React from 'react' -import { useContext } from 'use-context-selector' import type { ThoughtItem, ToolInfoInThought } from '../type' import Tool from '@/app/components/base/chat/chat/thought/tool' import type { Emoji } from '@/app/components/tools/types' -import I18n from '@/context/i18n' -import { getLanguage } from '@/i18n/language' - export type IThoughtProps = { thought: ThoughtItem allToolIcons: Record @@ -31,9 +27,6 @@ const Thought: FC = ({ allToolIcons, isFinished, }) => { - const { locale } = useContext(I18n) - const language = getLanguage(locale) - const [toolNames, isValueArray]: [string[], boolean] = (() => { try { if (Array.isArray(JSON.parse(thought.tool))) diff --git a/web/app/components/billing/vector-space-full/index.tsx b/web/app/components/billing/vector-space-full/index.tsx index 5cfe5c9bde..1abd27962d 100644 --- a/web/app/components/billing/vector-space-full/index.tsx +++ b/web/app/components/billing/vector-space-full/index.tsx @@ -6,13 +6,10 @@ import UpgradeBtn from '../upgrade-btn' import VectorSpaceInfo from '../usage-info/vector-space-info' import s from './style.module.css' import cn from '@/utils/classnames' -import { useProviderContext } from '@/context/provider-context' import GridMask from '@/app/components/base/grid-mask' const VectorSpaceFull: FC = () => { const { t } = useTranslation() - const { plan } = useProviderContext() - const { total } = plan return ( diff --git a/web/app/components/datasets/hit-testing/textarea.tsx b/web/app/components/datasets/hit-testing/textarea.tsx index 5c146ae368..1783acd658 100644 --- a/web/app/components/datasets/hit-testing/textarea.tsx +++ b/web/app/components/datasets/hit-testing/textarea.tsx @@ -1,4 +1,3 @@ -import { useContext } from 'use-context-selector' import { useTranslation } from 'react-i18next' import Button from '../../base/button' import Tag from '../../base/tag' @@ -6,7 +5,6 @@ import Tooltip from '../../base/tooltip' import { getIcon } from '../common/retrieval-method-info' import s from './style.module.css' import cn from '@/utils/classnames' -import DatasetDetailContext from '@/context/dataset-detail' import type { HitTestingResponse } from '@/models/datasets' import { hitTesting } from '@/service/datasets' import { asyncRunSafe } from '@/utils' @@ -40,7 +38,6 @@ const TextAreaWithButton = ({ onSubmit: _onSubmit, }: TextAreaWithButtonIProps) => { const { t } = useTranslation() - const { indexingTechnique } = useContext(DatasetDetailContext) function handleTextChange(event: any) { setText(event.target.value)