diff --git a/apps/web/components/dialogs/ai-expand-concept-prompt-dialog.component.tsx b/apps/web/components/dialogs/ai-expand-concept-prompt-dialog.component.tsx index 2da892a..9cf2437 100644 --- a/apps/web/components/dialogs/ai-expand-concept-prompt-dialog.component.tsx +++ b/apps/web/components/dialogs/ai-expand-concept-prompt-dialog.component.tsx @@ -71,7 +71,7 @@ export default function AiExpandConceptPromptDialogComponent({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > -
+
@@ -94,7 +94,7 @@ export default function AiExpandConceptPromptDialogComponent({
-
+
{isLoading && !completion && }
diff --git a/apps/web/components/dialogs/ai-prood-read-dialog.component.tsx b/apps/web/components/dialogs/ai-prood-read-dialog.component.tsx index 8632fb0..dbc35a2 100644 --- a/apps/web/components/dialogs/ai-prood-read-dialog.component.tsx +++ b/apps/web/components/dialogs/ai-prood-read-dialog.component.tsx @@ -6,7 +6,17 @@ import { Fragment, useEffect, useRef } from "react"; import { Streamdown } from "streamdown"; import { notifyError } from "../core/toast.component"; -export default function AiProofReadDialogComponent({ open, setOpen, content }) { +export default function AiProofReadDialogComponent({ + open, + setOpen, + content, + onReplace, +}: { + open: boolean; + setOpen: (open: boolean) => void; + content: string; + onReplace?: (content: string) => void; +}) { const cancelButtonRef = useRef(null); const { completion, complete, isLoading, setCompletion } = useCompletion({ @@ -65,7 +75,7 @@ export default function AiProofReadDialogComponent({ open, setOpen, content }) { leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > -
+
@@ -88,7 +98,7 @@ export default function AiProofReadDialogComponent({ open, setOpen, content }) {
-
+
{isLoading && !completion && }
@@ -103,6 +113,19 @@ export default function AiProofReadDialogComponent({ open, setOpen, content }) {
+ {onReplace && ( + + )}
); diff --git a/apps/web/pages/api/ai/free-changelog-generator.ts b/apps/web/pages/api/ai/free-changelog-generator.ts index d25b4a0..c00cf16 100644 --- a/apps/web/pages/api/ai/free-changelog-generator.ts +++ b/apps/web/pages/api/ai/free-changelog-generator.ts @@ -26,6 +26,8 @@ You are a changelog writer. Generate a well-formatted changelog based on the pro Format the output as markdown with clear sections and bullet points. Tone: ${tone === "casual" ? "Write in a casual, friendly tone" : "Write in a formal, professional tone"} ${intro === "Add a short intro and outro, make sure its generic and polite." ? "Include a brief intro and outro paragraph." : "Do not add any introduction or conclusion - just the changelog content."} + +IMPORTANT: Never remove any images, image tags, or image URLs from the input. All images must be preserved exactly as they appear in the original content. `, prompt: ` ${content} diff --git a/apps/web/pages/api/ai/proof-read.ts b/apps/web/pages/api/ai/proof-read.ts index 88d2762..a754561 100644 --- a/apps/web/pages/api/ai/proof-read.ts +++ b/apps/web/pages/api/ai/proof-read.ts @@ -19,6 +19,8 @@ const proofRead = withAuth(async (req, res) => { }, prompt: `Proofread and improve the following changelog content. Fix any grammar, spelling, or clarity issues while maintaining the original meaning and tone. Return only the improved text without any explanations. +IMPORTANT: Never remove any images, image tags, or image URLs from the content. All images must be preserved exactly as they appear in the original. + Content: ${content}`, }); diff --git a/apps/web/utils/changelog-ai.ts b/apps/web/utils/changelog-ai.ts index 1161aba..f6423ca 100644 --- a/apps/web/utils/changelog-ai.ts +++ b/apps/web/utils/changelog-ai.ts @@ -77,6 +77,10 @@ Example: "Created a changelog highlighting the new user authentication system wi Keep it to 1-2 sentences. Be specific about the main features/changes covered. + + +IMPORTANT: Never remove any images, videos, embeds, or other media from the content unless the user explicitly requests their removal. All media must be preserved exactly as they appear. + ${