Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

fix bug and show prompt

Abi Raja874afc1e665a
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 802e9609..ff7c83c8 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -155,7 +155,7 @@ function App() {
} else {
setAppHistory((prev) => {
// Validate parent version
- if (!parentVersion) {
+ if (parentVersion === null) {
toast.error(
"No parent version set. Contact support or open a Github issue."
);
diff --git a/frontend/src/components/history/HistoryDisplay.tsx b/frontend/src/components/history/HistoryDisplay.tsx
index f28a3000..aa00920f 100644
--- a/frontend/src/components/history/HistoryDisplay.tsx
+++ b/frontend/src/components/history/HistoryDisplay.tsx
@@ -30,7 +30,7 @@ export default function HistoryDisplay({
}: Props) {
return history.length === 0 ? null : (
<div className="flex flex-col h-screen">
- <h1 className="font-bold mb-2">History</h1>
+ <h1 className="font-bold mb-2">Versions</h1>
<ScrollArea className="flex-1 overflow-y-auto">
<ul className="space-y-0 flex flex-col-reverse">
{history.map((item, index) => (
@@ -58,6 +58,11 @@ export default function HistoryDisplay({
<h2 className="text-sm">(parent: v{item.parent + 1})</h2>
)}
</div>
+ <h2 className="text-sm">
+ {item.type === "ai_edit"
+ ? item.inputs.prompt
+ : item.inputs.image_url}
+ </h2>
<h2 className="text-sm">v{index + 1}</h2>
</li>
))}