mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 09:23:57 +08:00
feat: MCP market
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export function isMcpJson(content: string) {
|
||||
return content.match(/```json:mcp:(\w+)([\s\S]*?)```/);
|
||||
return content.match(/```json:mcp:([^{\s]+)([\s\S]*?)```/);
|
||||
}
|
||||
|
||||
export function extractMcpJson(content: string) {
|
||||
const match = content.match(/```json:mcp:(\w+)([\s\S]*?)```/);
|
||||
if (match) {
|
||||
const match = content.match(/```json:mcp:([^{\s]+)([\s\S]*?)```/);
|
||||
if (match && match.length === 3) {
|
||||
return { clientId: match[1], mcp: JSON.parse(match[2]) };
|
||||
}
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user