?"App imported successfully. Dyad will automatically generate an AI_RULES.md now."
:"App imported successfully",
);
onClose();
navigate({to:"/chat",search:{id:result.chatId}});
streamMessage({
prompt:
"Generate an AI_RULES.md file for this app. Describe the tech stack in 5-10 bullet points and describe clear rules about what libraries to use for what.",
chatId:result.chatId,
});
setSelectedAppId(result.appId);
awaitrefreshApps();
},
onError:(error:Error)=>{
showError(error.message);
},
});
consthandleSelectFolder=()=>{
selectFolderMutation.mutate();
};
consthandleImport=()=>{
importAppMutation.mutate();
};
consthandleClear=()=>{
setSelectedPath(null);
setHasAiRules(null);
setCustomAppName("");
setNameExists(false);
};
consthandleAppNameChange=async(
e:React.ChangeEvent<HTMLInputElement>,
)=>{
constnewName=e.target.value;
setCustomAppName(newName);
if(newName.trim()){
awaitcheckAppName(newName);
}
};
return(
<Dialogopen={isOpen}onOpenChange={onClose}>
<DialogContent>
<DialogHeader>
<DialogTitle>Import App</DialogTitle>
<DialogDescription>
Select an existing app folder to import into Dyad.