Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
bf5502c5
authored
Jul 07, 2026
by
DigHuang
Committed by
GitHub
Jul 07, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(chat): show agent v2 in team app filters (#7274)
parent
2449f981
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
54 deletions
+78
-54
projects/app/src/pageComponents/chat/ChatTeamApp/TypeTag.tsx
+53
-52
projects/app/src/pageComponents/chat/ChatTeamApp/index.tsx
+8
-2
projects/app/src/pageComponents/dashboard/agent/utils/appListTypes.ts
+1
-0
projects/app/test/pageComponents/dashboard/agent/utils/appListTypes.test.ts
+16
-0
No files found.
projects/app/src/pageComponents/chat/ChatTeamApp/TypeTag.tsx
View file @
bf5502c5
import
React
,
{
use
Ref
}
from
'react'
;
import
React
,
{
use
Memo
}
from
'react'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
MyIcon
from
'@fastgpt/web/components/common/Icon'
;
import
MyIcon
from
'@fastgpt/web/components/common/Icon'
;
import
{
Box
,
Flex
}
from
'@chakra-ui/react'
;
import
{
Box
,
Flex
}
from
'@chakra-ui/react'
;
...
@@ -7,55 +7,58 @@ import { useTranslation } from 'next-i18next';
...
@@ -7,55 +7,58 @@ import { useTranslation } from 'next-i18next';
const
AppTypeTag
=
({
type
}:
{
type
:
AppTypeEnum
})
=>
{
const
AppTypeTag
=
({
type
}:
{
type
:
AppTypeEnum
})
=>
{
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
map
=
useRef
({
const
map
=
useMemo
(
[
AppTypeEnum
.
chatAgent
]:
{
()
=>
({
label
:
'Agent'
,
[
AppTypeEnum
.
chatAgent
]:
{
icon
:
'core/app/type/simple'
,
label
:
t
(
'app:type.Chat_Agent_v2'
),
bg
:
'#DBF3FF'
,
icon
:
'core/app/type/simple'
,
color
:
'#0884DD'
bg
:
'#DBF3FF'
,
},
color
:
'#0884DD'
[
AppTypeEnum
.
simple
]:
{
},
label
:
t
(
'app:type.Chat_Agent'
),
[
AppTypeEnum
.
simple
]:
{
icon
:
'core/app/type/simple'
,
label
:
t
(
'app:type.Chat_Agent'
),
bg
:
'#DBF3FF'
,
icon
:
'core/app/type/simple'
,
color
:
'#0884DD'
bg
:
'#DBF3FF'
,
},
color
:
'#0884DD'
[
AppTypeEnum
.
workflow
]:
{
},
label
:
t
(
'app:type.Workflow bot'
),
[
AppTypeEnum
.
workflow
]:
{
icon
:
'core/app/type/workflow'
,
label
:
t
(
'app:type.Workflow bot'
),
bg
:
'#E4E1FC'
,
icon
:
'core/app/type/workflow'
,
color
:
'#6F5DD7'
bg
:
'#E4E1FC'
,
},
color
:
'#6F5DD7'
[
AppTypeEnum
.
workflowTool
]:
{
},
label
:
t
(
'app:toolType_workflow'
),
[
AppTypeEnum
.
workflowTool
]:
{
icon
:
'core/app/type/plugin'
,
label
:
t
(
'app:toolType_workflow'
),
bg
:
'#D0F5EE'
,
icon
:
'core/app/type/plugin'
,
color
:
'#007E7C'
bg
:
'#D0F5EE'
,
},
color
:
'#007E7C'
[
AppTypeEnum
.
httpPlugin
]:
{
},
label
:
t
(
'account_team:type.Http plugin'
),
[
AppTypeEnum
.
httpPlugin
]:
{
icon
:
'core/app/type/httpPlugin'
,
label
:
t
(
'account_team:type.Http plugin'
),
bg
:
'#FFE4EE'
,
icon
:
'core/app/type/httpPlugin'
,
color
:
'#E82F72'
bg
:
'#FFE4EE'
,
},
color
:
'#E82F72'
[
AppTypeEnum
.
httpToolSet
]:
{
},
label
:
t
(
'app:toolType_http'
),
[
AppTypeEnum
.
httpToolSet
]:
{
icon
:
'core/app/type/httpPlugin'
,
label
:
t
(
'app:toolType_http'
),
bg
:
'#FFE4EE'
,
icon
:
'core/app/type/httpPlugin'
,
color
:
'#E82F72'
bg
:
'#FFE4EE'
,
},
color
:
'#E82F72'
[
AppTypeEnum
.
mcpToolSet
]:
{
},
label
:
t
(
'app:toolType_mcp'
),
[
AppTypeEnum
.
mcpToolSet
]:
{
icon
:
'core/app/type/mcpTools'
,
label
:
t
(
'app:toolType_mcp'
),
bg
:
''
,
icon
:
'core/app/type/mcpTools'
,
color
:
''
bg
:
''
,
},
color
:
''
[
AppTypeEnum
.
tool
]:
undefined
,
},
[
AppTypeEnum
.
folder
]:
undefined
,
[
AppTypeEnum
.
tool
]:
undefined
,
[
AppTypeEnum
.
hidden
]:
undefined
[
AppTypeEnum
.
folder
]:
undefined
,
});
[
AppTypeEnum
.
hidden
]:
undefined
}),
[
t
]
);
const
data
=
map
.
current
[
type
as
keyof
typeof
map
.
current
];
const
data
=
map
[
type
as
keyof
typeof
map
];
return
data
?
(
return
data
?
(
<
Flex
<
Flex
...
@@ -69,9 +72,7 @@ const AppTypeTag = ({ type }: { type: AppTypeEnum }) => {
...
@@ -69,9 +72,7 @@ const AppTypeTag = ({ type }: { type: AppTypeEnum }) => {
whiteSpace=
{
'nowrap'
}
whiteSpace=
{
'nowrap'
}
>
>
<
MyIcon
name=
{
data
.
icon
as
any
}
w=
{
'0.8rem'
}
color=
{
'myGray.500'
}
/>
<
MyIcon
name=
{
data
.
icon
as
any
}
w=
{
'0.8rem'
}
color=
{
'myGray.500'
}
/>
<
Box
fontSize=
{
'mini'
}
>
<
Box
fontSize=
{
'mini'
}
>
{
data
.
label
}
</
Box
>
{
data
.
label
}
</
Box
>
</
Flex
>
</
Flex
>
)
:
null
;
)
:
null
;
};
};
...
...
projects/app/src/pageComponents/chat/ChatTeamApp/index.tsx
View file @
bf5502c5
...
@@ -46,7 +46,7 @@ const MyApps = ({ hideMobileHeader = false, mobileSearchKey }: MyAppsProps) => {
...
@@ -46,7 +46,7 @@ const MyApps = ({ hideMobileHeader = false, mobileSearchKey }: MyAppsProps) => {
const
map
=
useMemo
(
const
map
=
useMemo
(
()
=>
({
()
=>
({
all
:
t
(
'common:core.module.template.all_team_app'
),
all
:
t
(
'common:core.module.template.all_team_app'
),
[
AppTypeEnum
.
chatAgent
]:
'Agent'
,
[
AppTypeEnum
.
chatAgent
]:
t
(
'app:type.Chat_Agent_v2'
)
,
[
AppTypeEnum
.
simple
]:
t
(
'app:type.Chat_Agent'
),
[
AppTypeEnum
.
simple
]:
t
(
'app:type.Chat_Agent'
),
[
AppTypeEnum
.
workflow
]:
t
(
'app:type.Workflow bot'
),
[
AppTypeEnum
.
workflow
]:
t
(
'app:type.Workflow bot'
),
[
AppTypeEnum
.
workflowTool
]:
t
(
'app:toolType_workflow'
),
[
AppTypeEnum
.
workflowTool
]:
t
(
'app:toolType_workflow'
),
...
@@ -61,7 +61,13 @@ const MyApps = ({ hideMobileHeader = false, mobileSearchKey }: MyAppsProps) => {
...
@@ -61,7 +61,13 @@ const MyApps = ({ hideMobileHeader = false, mobileSearchKey }: MyAppsProps) => {
);
);
const
[
appType
,
setAppType
]
=
useState
<
AppTypeEnum
|
'all'
>
(
'all'
);
const
[
appType
,
setAppType
]
=
useState
<
AppTypeEnum
|
'all'
>
(
'all'
);
const
tabs
=
[
'all'
as
const
,
AppTypeEnum
.
simple
,
AppTypeEnum
.
workflow
,
AppTypeEnum
.
workflowTool
];
const
tabs
=
[
'all'
as
const
,
AppTypeEnum
.
chatAgent
,
AppTypeEnum
.
simple
,
AppTypeEnum
.
workflow
,
AppTypeEnum
.
workflowTool
];
return
(
return
(
<
Flex
flexDirection=
{
'column'
}
h=
{
'100%'
}
>
<
Flex
flexDirection=
{
'column'
}
h=
{
'100%'
}
>
...
...
projects/app/src/pageComponents/dashboard/agent/utils/appListTypes.ts
View file @
bf5502c5
...
@@ -35,6 +35,7 @@ export const resolveDashboardAppListTypes = ({
...
@@ -35,6 +35,7 @@ export const resolveDashboardAppListTypes = ({
return
[
return
[
AppTypeEnum
.
folder
,
AppTypeEnum
.
folder
,
AppTypeEnum
.
toolFolder
,
AppTypeEnum
.
toolFolder
,
AppTypeEnum
.
chatAgent
,
AppTypeEnum
.
simple
,
AppTypeEnum
.
simple
,
AppTypeEnum
.
workflow
,
AppTypeEnum
.
workflow
,
AppTypeEnum
.
workflowTool
AppTypeEnum
.
workflowTool
...
...
projects/app/test/pageComponents/dashboard/agent/utils/appListTypes.test.ts
View file @
bf5502c5
...
@@ -35,4 +35,20 @@ describe('resolveDashboardAppListTypes', () => {
...
@@ -35,4 +35,20 @@ describe('resolveDashboardAppListTypes', () => {
})
})
).
toEqual
([
AppTypeEnum
.
folder
,
AppTypeEnum
.
workflow
]);
).
toEqual
([
AppTypeEnum
.
folder
,
AppTypeEnum
.
workflow
]);
});
});
it
(
'should include chat agent v2 apps in the chat app list'
,
()
=>
{
expect
(
resolveDashboardAppListTypes
({
pathname
:
'/chat'
,
type
:
'all'
})
).
toEqual
([
AppTypeEnum
.
folder
,
AppTypeEnum
.
toolFolder
,
AppTypeEnum
.
chatAgent
,
AppTypeEnum
.
simple
,
AppTypeEnum
.
workflow
,
AppTypeEnum
.
workflowTool
]);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment