Merge branch 'dbgpts_hub_dev' of https://github.com/eosphoros-ai/DB-GPT into dbgpts_hub_dev

This commit is contained in:
yhjun1026
2024-08-26 14:54:20 +08:00
5 changed files with 12 additions and 7 deletions

View File

@@ -362,9 +362,9 @@ export const postAgentUninstall = (pluginName: string, user?: string) => {
timeout: 60000, 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, { return POST("/api/v1/serve/dbgpts/my/uninstall", undefined, {
params: { name: pluginName, user }, params: { ...data, user },
timeout: 60000, timeout: 60000,
}); });
}; };

View File

@@ -325,6 +325,7 @@ export const CommonEn = {
Copy_Btn: 'Copy', Copy_Btn: 'Copy',
Delete_Btn: 'Delete', Delete_Btn: 'Delete',
dbgpts_community: 'DBGPTS Community', dbgpts_community: 'DBGPTS Community',
community_dbgpts: 'Community DBGPTS',
my_dbgpts: 'My DBGPTS', my_dbgpts: 'My DBGPTS',
Refresh_dbgpts: 'Refresh from the community Git repository', Refresh_dbgpts: 'Refresh from the community Git repository',
workflow: 'Workflow', workflow: 'Workflow',

View File

@@ -327,6 +327,7 @@ export const CommonZh: Resources["translation"] = {
Copy_Btn: '复制', Copy_Btn: '复制',
Delete_Btn: '删除', Delete_Btn: '删除',
dbgpts_community: 'DBGPTS社区', dbgpts_community: 'DBGPTS社区',
community_dbgpts: '社区DBGPTS',
my_dbgpts: '我的DBGPTS', my_dbgpts: '我的DBGPTS',
Refresh_dbgpts: '从社区Git仓库刷新', Refresh_dbgpts: '从社区Git仓库刷新',
workflow: '工作流', workflow: '工作流',

View File

@@ -52,7 +52,7 @@ const BlurredCard: React.FC<{
<span <span
className="line-clamp-1 text-ellipsis font-semibold text-base" className="line-clamp-1 text-ellipsis font-semibold text-base"
style={{ style={{
// maxWidth: '60%', maxWidth: '60%',
}} }}
> >
{name} {name}
@@ -62,7 +62,7 @@ const BlurredCard: React.FC<{
<span <span
className="line-clamp-1 text-ellipsis font-semibold text-base" className="line-clamp-1 text-ellipsis font-semibold text-base"
style={{ style={{
// maxWidth: '60%', maxWidth: '60%',
}} }}
> >
{name} {name}

View File

@@ -81,7 +81,7 @@ function Agent() {
}, [activeKey, typeStr]); }, [activeKey, typeStr]);
const pluginAction = useCallback( const pluginAction = useCallback(
async (agent: { name: string }, index: number, isInstall: boolean) => { async (agent: { name: string, type: string }, index: number, isInstall: boolean) => {
if (actionIndex) return; if (actionIndex) return;
setActionIndex(index); setActionIndex(index);
setLoading(true); setLoading(true);
@@ -90,7 +90,10 @@ function Agent() {
const [err] = await apiInterceptors(postDbgptsInstall(agent)); const [err] = await apiInterceptors(postDbgptsInstall(agent));
errs = err; errs = err;
} else { } else {
const [err] = await apiInterceptors(postDbgptsUninstall(agent.name)); const [err] = await apiInterceptors(postDbgptsUninstall({
name: agent.name,
type: agent.type
}));
errs = err; errs = err;
} }
setLoading(false); setLoading(false);
@@ -105,7 +108,7 @@ function Agent() {
const items: SegmentedProps['options'] = [ const items: SegmentedProps['options'] = [
{ {
value: 'market', value: 'market',
label: 'DBGPTS', label: t('community_dbgpts'),
}, },
{ {
value: 'my', value: 'my',