Unverified 提交 be8252c1 authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Skip AI rules generation if it already exists upon import (#204)

上级 4d2b4783
...@@ -100,11 +100,13 @@ export function ImportAppDialog({ isOpen, onClose }: ImportAppDialogProps) { ...@@ -100,11 +100,13 @@ export function ImportAppDialog({ isOpen, onClose }: ImportAppDialogProps) {
onClose(); onClose();
navigate({ to: "/chat", search: { id: result.chatId } }); navigate({ to: "/chat", search: { id: result.chatId } });
if (!hasAiRules) {
streamMessage({ streamMessage({
prompt: 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.", "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, chatId: result.chatId,
}); });
}
setSelectedAppId(result.appId); setSelectedAppId(result.appId);
await refreshApps(); await refreshApps();
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论