From 231783eebe694aa8010d2d41fd47fa618ba3c99f Mon Sep 17 00:00:00 2001 From: JzoNg Date: Fri, 3 Apr 2026 15:13:52 +0800 Subject: [PATCH] chore(web): fix lint --- .../app-info/app-info-detail-panel.tsx | 10 +- .../components/app/app-publisher/index.tsx | 28 +-- .../config/automatic/get-automatic-res.tsx | 10 +- .../code-generator/get-code-generator-res.tsx | 6 +- .../components/apps/app-type-filter-shared.ts | 5 +- web/app/components/apps/app-type-filter.tsx | 5 +- web/app/components/base/ui/select/index.tsx | 12 +- .../components/metric-selector/utils.ts | 2 +- web/app/components/evaluation/store-utils.ts | 6 +- .../workflow/create-snippet-dialog.tsx | 14 +- web/service/__tests__/use-apps.spec.tsx | 11 +- web/service/use-apps.ts | 3 - web/service/use-evaluation.ts | 212 +----------------- web/service/use-snippet-workflows.ts | 101 --------- web/service/use-snippets.mock.ts | 25 +-- web/service/use-snippets.ts | 91 -------- web/types/app.ts | 129 ++++++----- 17 files changed, 137 insertions(+), 533 deletions(-) diff --git a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx index 43c5711490e..8d288460814 100644 --- a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx +++ b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx @@ -97,7 +97,7 @@ const AppInfoDetailPanel = ({
@@ -109,14 +109,14 @@ const AppInfoDetailPanel = ({ imageUrl={appDetail.icon_url} />
-
{appDetail.name}
-
+
{appDetail.name}
+
{getAppModeLabel(appDetail.mode, t)}
{appDetail.description && ( -
+
{appDetail.description}
)} @@ -142,7 +142,7 @@ const AppInfoDetailPanel = ({ onClick={switchOperation.onClick} > {switchOperation.icon} - {switchOperation.title} + {switchOperation.title}
)} diff --git a/web/app/components/app/app-publisher/index.tsx b/web/app/components/app/app-publisher/index.tsx index e48d523bff0..ca8441cfb43 100644 --- a/web/app/components/app/app-publisher/index.tsx +++ b/web/app/components/app/app-publisher/index.tsx @@ -1,7 +1,7 @@ import type { ModelAndParameter } from '../configuration/debug/types' import type { InputVar, Variable } from '@/app/components/workflow/types' import type { I18nKeysByPrefix } from '@/types/i18n' -import type { PublishWorkflowParams } from '@/types/workflow' +import type { PublishWorkflowParams, WorkflowTypeConversionTarget } from '@/types/workflow' import { useKeyPress } from 'ahooks' import { memo, @@ -82,7 +82,7 @@ const AccessModeDisplay: React.FC<{ mode?: AccessMode }> = ({ mode }) => { <>
- {t(`accessControlDialog.accessItems.${label}`, { ns: 'app' })} + {t(`accessControlDialog.accessItems.${label}`, { ns: 'app' })}
) @@ -270,7 +270,7 @@ const AppPublisher = ({ appId: appDetail.id, }, query: { - target_type: workflowTypeSwitchConfig.targetType, + target_type: workflowTypeSwitchConfig.targetType as WorkflowTypeConversionTarget, }, }) @@ -321,7 +321,7 @@ const AppPublisher = ({