diff --git a/apps/mobile/src/features/threads/PendingApprovalCard.tsx b/apps/mobile/src/features/threads/PendingApprovalCard.tsx index f9ec44d5d4ee5..1c2092573c519 100644 --- a/apps/mobile/src/features/threads/PendingApprovalCard.tsx +++ b/apps/mobile/src/features/threads/PendingApprovalCard.tsx @@ -1,17 +1,20 @@ import { Button } from "../../components/ui/Button"; -import type { - ProviderApprovalDecision, - ProviderApprovalOption, - RuntimeRequestId, +import { + httpPageUrl, + type ProviderApprovalDecision, + type ProviderApprovalOption, + type RuntimeRequestId, } from "@t3tools/contracts"; import { FULL_ACCESS_OVERRIDE_QUESTION, fullAccessOverrideExplanation, + MCP_URL_ELICITATION_HINT, } from "@t3tools/client-runtime/state/thread-requests"; import { useState } from "react"; import { Pressable, View } from "react-native"; import { AppText as Text } from "../../components/ui/AppText"; +import { tryOpenExternalUrl } from "../../lib/openExternalUrl"; import type { PendingApproval } from "../../lib/threadActivity"; export interface PendingApprovalCardProps { @@ -37,6 +40,10 @@ export function PendingApprovalCard(props: PendingApprovalCardProps) { const canRespond = props.approval.responseCapability === "live"; const disabled = !canRespond || props.respondingApprovalId === props.approval.requestId; const [explanationOpen, setExplanationOpen] = useState(false); + const [linkError, setLinkError] = useState(false); + const elicitationUrl = props.approval.elicitationUrl + ? httpPageUrl(props.approval.elicitationUrl) + : null; return ( @@ -50,6 +57,33 @@ export function PendingApprovalCard(props: PendingApprovalCardProps) { {props.approval.detail} ) : null} + {elicitationUrl ? ( + + + {MCP_URL_ELICITATION_HINT} + + + {elicitationUrl.href} + +