From be8252c13024fdbb05ba1140aca2a7b01459c7c2 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 19 May 2025 22:42:02 -0700 Subject: [PATCH] Skip AI rules generation if it already exists upon import (#204) --- src/components/ImportAppDialog.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/ImportAppDialog.tsx b/src/components/ImportAppDialog.tsx index 9d03d34..37a86c9 100644 --- a/src/components/ImportAppDialog.tsx +++ b/src/components/ImportAppDialog.tsx @@ -100,11 +100,13 @@ export function ImportAppDialog({ isOpen, onClose }: ImportAppDialogProps) { 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, - }); + if (!hasAiRules) { + 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); await refreshApps(); },