diff --git a/web/client/api/request.ts b/web/client/api/request.ts index 63d54f546..6abe30eb6 100644 --- a/web/client/api/request.ts +++ b/web/client/api/request.ts @@ -362,9 +362,9 @@ export const postAgentUninstall = (pluginName: string, user?: string) => { timeout: 60000, }); }; -export const postDbgptsUninstall = (pluginName: string, user?: string) => { +export const postDbgptsUninstall = (data: { name: string, type: string }, user?: string) => { return POST("/api/v1/serve/dbgpts/my/uninstall", undefined, { - params: { name: pluginName, user }, + params: { ...data, user }, timeout: 60000, }); }; diff --git a/web/locales/en/common.ts b/web/locales/en/common.ts index 15040540d..3523d7bc7 100644 --- a/web/locales/en/common.ts +++ b/web/locales/en/common.ts @@ -325,6 +325,7 @@ export const CommonEn = { Copy_Btn: 'Copy', Delete_Btn: 'Delete', dbgpts_community: 'DBGPTS Community', + community_dbgpts: 'Community DBGPTS', my_dbgpts: 'My DBGPTS', Refresh_dbgpts: 'Refresh from the community Git repository', workflow: 'Workflow', diff --git a/web/locales/zh/common.ts b/web/locales/zh/common.ts index 70111fa10..50743647d 100644 --- a/web/locales/zh/common.ts +++ b/web/locales/zh/common.ts @@ -327,6 +327,7 @@ export const CommonZh: Resources["translation"] = { Copy_Btn: '复制', Delete_Btn: '删除', dbgpts_community: 'DBGPTS社区', + community_dbgpts: '社区DBGPTS', my_dbgpts: '我的DBGPTS', Refresh_dbgpts: '从社区Git仓库刷新', workflow: '工作流', diff --git a/web/new-components/common/blurredCard/index.tsx b/web/new-components/common/blurredCard/index.tsx index a4863748c..a51b0c943 100644 --- a/web/new-components/common/blurredCard/index.tsx +++ b/web/new-components/common/blurredCard/index.tsx @@ -52,7 +52,7 @@ const BlurredCard: React.FC<{ {name} @@ -62,7 +62,7 @@ const BlurredCard: React.FC<{ {name} diff --git a/web/pages/construct/dbgpts/index.tsx b/web/pages/construct/dbgpts/index.tsx index 193de1240..50c0e4ca1 100644 --- a/web/pages/construct/dbgpts/index.tsx +++ b/web/pages/construct/dbgpts/index.tsx @@ -81,7 +81,7 @@ function Agent() { }, [activeKey, typeStr]); const pluginAction = useCallback( - async (agent: { name: string }, index: number, isInstall: boolean) => { + async (agent: { name: string, type: string }, index: number, isInstall: boolean) => { if (actionIndex) return; setActionIndex(index); setLoading(true); @@ -90,7 +90,10 @@ function Agent() { const [err] = await apiInterceptors(postDbgptsInstall(agent)); errs = err; } else { - const [err] = await apiInterceptors(postDbgptsUninstall(agent.name)); + const [err] = await apiInterceptors(postDbgptsUninstall({ + name: agent.name, + type: agent.type + })); errs = err; } setLoading(false); @@ -105,7 +108,7 @@ function Agent() { const items: SegmentedProps['options'] = [ { value: 'market', - label: 'DBGPTS', + label: t('community_dbgpts'), }, { value: 'my',