/* * Derived from vercel/ai-elements (skills/ai-elements/scripts/confirmation.tsx). * Copyright 2023 Vercel, Inc. Licensed under Apache-2.0. * Modified by ZCode: local integration, formatting and adaptations. * See THIRD-PARTY-NOTICES.md in the repository root for license and provenance. */ "use client"; import { Confirmation, ConfirmationAccepted, ConfirmationAction, ConfirmationActions, ConfirmationRejected, ConfirmationRequest, ConfirmationTitle, } from "@/components/ai-elements/confirmation"; import { CheckIcon, XIcon } from "lucide-react"; import { nanoid } from "nanoid"; const handleReject = () => { // In production, call respondToConfirmationRequest with approved: false }; const handleApprove = () => { // In production, call respondToConfirmationRequest with approved: true }; const Example = () => (
This tool wants to delete the file{" "} /tmp/example.txt. Do you approve this action? You approved this tool execution You rejected this tool execution Reject Approve
); export default Example;