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(web): resolve TypeScript errors in app overview components (#23901)
lyzno1cc4d82f93208
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsxindex 3d572b926af..e58e79918f4 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx@@ -3,7 +3,7 @@ import type { FC } from 'react'import React from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'-import AppCard from '@/app/components/app/overview/appCard'+import AppCard from '@/app/components/app/overview/app-card'import Loading from '@/app/components/base/loading'import MCPServiceCard from '@/app/components/tools/mcp/mcp-service-card'import { ToastContext } from '@/app/components/base/toast'@@ -17,7 +17,7 @@ import type { App } from '@/types/app'import type { UpdateAppSiteCodeResponse } from '@/models/app'import { asyncRunSafe } from '@/utils'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'-import type { IAppCardProps } from '@/app/components/app/overview/appCard'+import type { IAppCardProps } from '@/app/components/app/overview/app-card'import { useStore as useAppStore } from '@/app/components/app/store'export type ICardViewProps = {diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsxindex 09d3e4317cc..847de191652 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx@@ -3,8 +3,8 @@ import React, { useState } from 'react'import dayjs from 'dayjs'import quarterOfYear from 'dayjs/plugin/quarterOfYear'import { useTranslation } from 'react-i18next'-import type { PeriodParams } from '@/app/components/app/overview/appChart'-import { AvgResponseTime, AvgSessionInteractions, AvgUserInteractions, ConversationsChart, CostChart, EndUsersChart, MessagesChart, TokenPerSecond, UserSatisfactionRate, WorkflowCostChart, WorkflowDailyTerminalsChart, WorkflowMessagesChart } from '@/app/components/app/overview/appChart'+import type { PeriodParams } from '@/app/components/app/overview/app-chart'+import { AvgResponseTime, AvgSessionInteractions, AvgUserInteractions, ConversationsChart, CostChart, EndUsersChart, MessagesChart, TokenPerSecond, UserSatisfactionRate, WorkflowCostChart, WorkflowDailyTerminalsChart, WorkflowMessagesChart } from '@/app/components/app/overview/app-chart'import type { Item } from '@/app/components/base/select'import { SimpleSelect } from '@/app/components/base/select'import { TIME_PERIOD_MAPPING } from '@/app/components/app/log/filter'diff --git a/web/app/components/app/overview/appCard.tsx b/web/app/components/app/overview/app-card.tsxsimilarity index 98%rename from web/app/components/app/overview/appCard.tsxrename to web/app/components/app/overview/app-card.tsxindex f11e111cb01..02fd779df6c 100644--- a/web/app/components/app/overview/appCard.tsx+++ b/web/app/components/app/overview/app-card.tsx@@ -35,7 +35,7 @@ import type { AppDetailResponse } from '@/models/app'import { useAppContext } from '@/context/app-context'import type { AppSSO } from '@/types/app'import Indicator from '@/app/components/header/indicator'-import { fetchAppDetail } from '@/service/apps'+import { fetchAppDetailDirect } from '@/service/apps'import { AccessMode } from '@/models/access-control'import AccessControl from '../app-access-control'import { useAppWhiteListSubjects } from '@/service/access-control'@@ -161,11 +161,15 @@ function AppCard({returnsetShowAccessControl(true)}, [appDetail])- const handleAccessControlUpdate = useCallback(() => {- fetchAppDetail({ url: '/apps', id: appDetail!.id }).then((res) => {+ const handleAccessControlUpdate = useCallback(async () => {+ try {+ const res = await fetchAppDetailDirect({ url: '/apps', id: appDetail!.id })setAppDetail(res)setShowAccessControl(false)- })+ }+ catch (error) {+ console.error('Failed to fetch app detail:', error)+ }}, [appDetail, setAppDetail])return (diff --git a/web/app/components/app/overview/appChart.tsx b/web/app/components/app/overview/app-chart.tsxsimilarity index 99%rename from web/app/components/app/overview/appChart.tsxrename to web/app/components/app/overview/app-chart.tsxindex 4e74eda6004..1c75f1cfa98 100644--- a/web/app/components/app/overview/appChart.tsx+++ b/web/app/components/app/overview/app-chart.tsx@@ -242,7 +242,7 @@ const Chart: React.FC<IChartProps> = ({? '': <span>{t('appOverview.analysis.tokenUsage.consumed')} Tokens<span className='text-sm'><span className='ml-1 text-text-tertiary'>(</span>- <span className='text-orange-400'>~{sum(statistics.map(item => Number.parseFloat(get(item, 'total_price', '0')))).toLocaleString('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 4 })}</span>+ <span className='text-orange-400'>~{sum(statistics.map(item => Number.parseFloat(String(get(item, 'total_price', '0'))))).toLocaleString('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 4 })}</span><span className='text-text-tertiary'>)</span></span></span>}textStyle={{ main: `!text-3xl !font-normal ${sumData === 0 ? '!text-text-quaternary' : ''}` }} />