useGenAIUGCAgentsClonePersonaMutation",["RelayHooks","react","useGenAIUGCAgentsClonePersonaMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=(i||d("react")).useCallback;function a(a){var c=a.onComplete,e=a.onError;a=d("RelayHooks").useMutation(h!==void 0?h:h=b("useGenAIUGCAgentsClonePersonaMutation.graphql"));var f=a[0];a=a[1];var g=j(function(a){f({onCompleted:function(a){var b,d,e=a==null||(b=a.xfb_aistudio_tooling_clone_persona)==null?void 0:b.message;a=a==null||(d=a.xfb_aistudio_tooling_clone_persona)==null?void 0:d.cloned_persona_id;c(a,e)},onError:function(){e()},variables:{persona_id:a}})},[f,c,e]);return[g,a]}g["default"]=a}),98);
-----
useGenAIUGCAgentsClonePersonaMutation.graphql",["useGenAIUGCAgentsClonePersonaMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"persona_id"}],c=[{alias:null,args:[{fields:[{kind:"Variable",name:"persona_id",variableName:"persona_id"}],kind:"ObjectValue",name:"data"}],concreteType:"XFBAistudioToolingClonePersonaResponsePayload",kind:"LinkedField",name:"xfb_aistudio_tooling_clone_persona",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cloned_persona_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useGenAIUGCAgentsClonePersonaMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useGenAIUGCAgentsClonePersonaMutation",selections:c},params:{id:b("useGenAIUGCAgentsClonePersonaMutation_facebookRelayOperation"),metadata:{},name:"useGenAIUGCAgentsClonePersonaMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
KirbyAdvancedCreationInternalToolsSection.react",["fbt","CDSButton.react","CDSText.react","CDSTextAreaInput.react","CometColumn.react","CometColumnItem.react","CometLink.react","KirbyAdvancedCreationFieldSectionHeaderRow.react","cdsPushToast","react","useCurrentRoute","useGenAIUGCAgentsClonePersonaMutation"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react")),k=i.useState,l={clonedPersonaIDText:{marginTop:"xw7yly9",$$css:!0},headerRow:{marginBottom:"x1yztbdb",$$css:!0},primaryActionButtonbutton:{marginTop:"x1xmf6yo",width:"xh8yej3",$$css:!0}};function a(a){var b=a.onChange,e=a.personaId,f=a.personaVersionPrompt;(function(){b("placeholder","NAME")});a=k("");var g=a[0],i=a[1];a=k(!1);var m=a[0],n=a[1];a=k(null);var o=a[0],p=a[1],q=c("useCurrentRoute")();(function(){e});a=function(){i(f),n(!m)};var r=c("useGenAIUGCAgentsClonePersonaMutation")({onComplete:function(a,b){d("cdsPushToast").pushToast({message:b!=null?b:""}),p(a)},onError:function(){d("cdsPushToast").pushToast({message:"Unexpected error occurred when attempting to clone persona. Please try again later."})}}),s=r[0];r=r[1];var t=function(){s(e)};return j.jsxs(c("CometColumn.react"),{children:[j.jsx(c("CometColumnItem.react"),{xstyle:l.headerRow,children:j.jsx(c("KirbyAdvancedCreationFieldSectionHeaderRow.react"),{subtitle:h._(/*BTDS*/"Displays the system prompt for the persona. This is the prompt that is sent to the LLM to steer the response and give the LLM response personality specific to the persona."),title:h._(/*BTDS*/"System Prompt")})}),m&&j.jsx(c("CometColumnItem.react"),{children:j.jsx(c("CDSTextAreaInput.react"),{disabled:!0,label:h._(/*BTDS*/"System Prompt"),maxRows:12,onValueChange:function(){},placeholder:"System prompt will appear here",value:g||""})}),j.jsx(c("CometColumnItem.react"),{xstyle:l.primaryActionButtonbutton,children:j.jsx(c("CDSButton.react"),{label:m?h._(/*BTDS*/"Hide System Prompt"):h._(/*BTDS*/"Show System Prompt"),onPress:a,type:"secondary"})}),j.jsx(c("CometColumnItem.react"),{xstyle:l.headerRow,children:j.jsx(c("KirbyAdvancedCreationFieldSectionHeaderRow.react"),{subtitle:h._(/*BTDS*/"Clone the persona to a new persona. This is useful for testing various options to see how the LLM responds."),title:h._(/*BTDS*/"Clone Persona")})}),j.jsx(c("CometColumnItem.react"),{children:j.jsx(c("CDSText.react"),{children:h._(/*BTDS*/"A new persona will be created with the latest persona version with the exact same atributes and ownership properties. The new persona will be name with [CLONE] prefix.")})}),o!=null&&j.jsx(c("CometColumnItem.react"),{xstyle:l.clonedPersonaIDText,children:j.jsx(c("CometLink.react"),{href:function(a){a=(a=q==null?void 0:q.url.replace(//+$/,""))!=null?a:"";a=a.split("/");a[a.length-1]=o;return a.join("/")}(),target:"_blank",children:j.jsx(c("CDSText.react"),{children:h._(/*BTDS*/"u2705 Persona cloned to new ID: {clonedPersonaID}",[h._param("clonedPersonaID",o)])})})}),j.jsx(c("CometColumnItem.react"),{xstyle:l.primaryActionButtonbutton,children:j.jsx(c("CDSButton.react"),{label:h._(/*BTDS*/"Clone Persona"),loading:r,onPress:t,type:"secondaryDestructive"})})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
useGenAIUGCAgentsClonePersonaMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="25056465473951381"}),null);
-----