mirror of
https://github.com/dataelement/bisheng.git
synced 2026-10-30 18:42:04 +08:00
feat: mcp示例更新
This commit is contained in:
@@ -361,7 +361,7 @@ export const getChatOnlineApi = async (page, keyword, tag_id, disableLimit = 8)
|
||||
keyword,
|
||||
limit: disableLimit
|
||||
}
|
||||
if (tag_id !== -1 && tag_id != null && !['favorites', 'uncategorized'].includes(tag_id)) {
|
||||
if (tag_id !== -1 && tag_id != null) {
|
||||
params.tag_id = tag_id
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ export default function AgentCenter() {
|
||||
const result = await getChatOnlineApi(
|
||||
currentPage,
|
||||
query,
|
||||
categoryIdRef.current,
|
||||
-1,
|
||||
pageSize // 禁用默认限制,或根据接口逻辑调整
|
||||
);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ const handleHistoryMsg = (data: any[]): ChatMessageType[] => {
|
||||
if ('input' in message) {
|
||||
chatKey = 'input'
|
||||
} else {
|
||||
Object.keys(message)[0]
|
||||
chatKey = Object.keys(message)[0]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ const handleHistoryMsg = (data: any[]): ChatMessageType[] => {
|
||||
if ('input' in message) {
|
||||
chatKey = 'input'
|
||||
} else {
|
||||
Object.keys(message)[0]
|
||||
chatKey = Object.keys(message)[0]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,14 +148,25 @@ const McpServerEditorDialog = forwardRef(({ existingNames = [], onReload }, ref)
|
||||
|
||||
// 示例配置
|
||||
const exampleConfigs = {
|
||||
gaode: JSON.stringify({
|
||||
gaode1: JSON.stringify({
|
||||
"mcpServers": {
|
||||
"amap-sse": {
|
||||
"type": "sse",
|
||||
"name": "高德地图",
|
||||
"description": "提供全场景覆盖的地图服务,包括地理编码、逆地理编码、IP 定位、天气查询、骑行路径规划、步行路径规划、驾车路径规划、公交路径规划、距离测量、关键词搜索、周边搜索、详情搜索等。",
|
||||
"url": "https://mcp.amap.com/sse?key=yourapikey"
|
||||
}
|
||||
}
|
||||
}, null, 2),
|
||||
gaode2: JSON.stringify({
|
||||
"mcpServers": {
|
||||
"amap-streamable": {
|
||||
"type": "streamable",
|
||||
"name": "高德地图",
|
||||
"description": "提供全场景覆盖的地图服务,包括地理编码、逆地理编码、IP 定位、天气查询、骑行路径规划、步行路径规划、驾车路径规划、公交路径规划、距离测量、关键词搜索、周边搜索、详情搜索等。",
|
||||
"url": "https://mcp.amap.com/mcp?key=yourapikey"
|
||||
}
|
||||
}
|
||||
}, null, 2)
|
||||
};
|
||||
|
||||
@@ -359,7 +370,8 @@ const McpServerEditorDialog = forwardRef(({ existingNames = [], onReload }, ref)
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem value="gaode">高德地图</SelectItem>
|
||||
<SelectItem value="gaode1">高德地图(SSE 协议)</SelectItem>
|
||||
<SelectItem value="gaode2">高德地图(streamable 协议)</SelectItem>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
Reference in New Issue
Block a user