Skip to content

Commit 2259bfc

Browse files
author
priyanshu.solanki
committed
fixing merge conflicts
1 parent 85af046 commit 2259bfc

File tree

4 files changed

+0
-8118
lines changed

4 files changed

+0
-8118
lines changed

apps/sim/app/api/mcp/workflow-servers/[id]/connection-info/route.ts

Lines changed: 0 additions & 70 deletions
This file was deleted.

apps/sim/hooks/queries/workflow-mcp-servers.ts

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -506,52 +506,3 @@ export function useDeleteWorkflowMcpTool() {
506506
},
507507
})
508508
}
509-
510-
/**
511-
* Connection info for an MCP server
512-
*/
513-
export interface WorkflowMcpServerConnectionInfo {
514-
serverId: string
515-
serverName: string
516-
sseUrl: string
517-
httpUrl: string
518-
authHeader: string
519-
instructions: string
520-
}
521-
522-
/**
523-
* Fetch connection info for a workflow MCP server
524-
*/
525-
async function fetchWorkflowMcpServerConnectionInfo(
526-
workspaceId: string,
527-
serverId: string
528-
): Promise<WorkflowMcpServerConnectionInfo> {
529-
const response = await fetch(
530-
`/api/mcp/workflow-servers/${serverId}/connection-info?workspaceId=${workspaceId}`
531-
)
532-
533-
const data = await response.json()
534-
535-
if (!response.ok) {
536-
throw new Error(data.error || 'Failed to fetch connection info')
537-
}
538-
539-
return data.data
540-
}
541-
542-
/**
543-
* Hook to fetch connection info for a published MCP server
544-
*/
545-
export function useWorkflowMcpServerConnectionInfo(
546-
workspaceId: string,
547-
serverId: string | null,
548-
enabled = true
549-
) {
550-
return useQuery({
551-
queryKey: [...workflowMcpServerKeys.server(workspaceId, serverId || ''), 'connection-info'],
552-
queryFn: () => fetchWorkflowMcpServerConnectionInfo(workspaceId, serverId!),
553-
enabled: !!workspaceId && !!serverId && enabled,
554-
retry: false,
555-
staleTime: 5 * 60 * 1000, // 5 minutes - connection info doesn't change often
556-
})
557-
}

0 commit comments

Comments
 (0)