perf: tool call check (#4818)
* i18n * tool call * fix: mcp create permission;Plugin unauth tip * fix: mcp create permission;Plugin unauth tip * fix: Cite modal permission * remove invalide cite * perf: prompt * filter fulltext search * fix: ts * fix: ts * fix: ts
This commit is contained in:
@@ -30,6 +30,7 @@ import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { type McpKeyType } from '@fastgpt/global/support/mcp/type';
|
||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
|
||||
const UsageWay = dynamic(() => import('@/pageComponents/dashboard/mcp/usageWay'), {
|
||||
ssr: false
|
||||
@@ -38,6 +39,7 @@ const UsageWay = dynamic(() => import('@/pageComponents/dashboard/mcp/usageWay')
|
||||
const McpServer = () => {
|
||||
const { t } = useTranslation();
|
||||
const { isPc } = useSystem();
|
||||
const { userInfo } = useUserStore();
|
||||
|
||||
const {
|
||||
data: mcpServerList = [],
|
||||
@@ -78,7 +80,10 @@ const McpServer = () => {
|
||||
{t('dashboard_mcp:mcp_server_description')}
|
||||
</Box>
|
||||
</Box>
|
||||
<Button onClick={() => setEditMcp(defaultForm)}>
|
||||
<Button
|
||||
isDisabled={!userInfo?.permission.hasApikeyCreatePer}
|
||||
onClick={() => setEditMcp(defaultForm)}
|
||||
>
|
||||
{t('dashboard_mcp:create_mcp_server')}
|
||||
</Button>
|
||||
</Flex>
|
||||
@@ -94,7 +99,10 @@ const McpServer = () => {
|
||||
{t('dashboard_mcp:mcp_server_description')}
|
||||
</Box>
|
||||
<Flex mt={2} justifyContent={'flex-end'}>
|
||||
<Button onClick={() => setEditMcp(defaultForm)}>
|
||||
<Button
|
||||
isDisabled={!userInfo?.permission.hasApikeyCreatePer}
|
||||
onClick={() => setEditMcp(defaultForm)}
|
||||
>
|
||||
{t('dashboard_mcp:create_mcp_server')}
|
||||
</Button>
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user