import { Checkbox, DefaultButton, IconButton, Link, Modal, PrimaryButton, Stack, Text, TextField, } from "@fluentui/react"; import Explorer from "Explorer/Explorer"; import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext"; import { SubmitFeedback } from "Explorer/QueryCopilot/Shared/QueryCopilotClient"; import React from "react"; export const QueryCopilotFeedbackModal = ({ explorer, databaseId, containerId, mode, }: { explorer: Explorer; databaseId: string; containerId: string; mode: string; }): JSX.Element => { const { generatedQuery, userPrompt, likeQuery, showFeedbackModal, closeFeedbackModal, setHideFeedbackModalForLikedQueries, } = useCopilotStore(); const [description, setDescription] = React.useState(""); const [doNotShowAgainChecked, setDoNotShowAgainChecked] = React.useState(false); const handleSubmit = () => { closeFeedbackModal(); setHideFeedbackModalForLikedQueries(doNotShowAgainChecked); SubmitFeedback({ params: { generatedQuery, likeQuery, description, userPrompt }, explorer, databaseId, containerId, mode: mode, }); }; return (
Send feedback to Microsoft closeFeedbackModal()} /> Your feedback will help improve the experience. setDescription(newValue)} multiline rows={3} /> Microsoft will process the feedback you submit pursuant to your organization’s instructions in order to improve your and your organization’s experience with this product. If you have any questions about the use of feedback data, please contact your tenant administrator. Processing of feedback data is governed by the Microsoft Products and Services Data Protection Addendum between your organization and Microsoft, and the feedback you submit is considered Personal Data under that addendum. Please see the{" "} { Privacy statement }{" "} for more information. {likeQuery && ( setDoNotShowAgainChecked(checked)} /> )} Submit closeFeedbackModal()}>Cancel
); };