8000 fix bug and show prompt · ag-python/screenshot-to-code@874afc1 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 874afc1

Browse files
committed
fix bug and show prompt
1 parent 0e8eef4 commit 874afc1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function App() {
155155
} else {
156156
setAppHistory((prev) => {
157157
// Validate parent version
158-
if (!parentVersion) {
158+
if (parentVersion === null) {
159159
toast.error(
160160
"No parent version set. Contact support or open a Github issue."
161161
);

frontend/src/components/history/HistoryDisplay.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function HistoryDisplay({
3030
}: Props) {
3131
return history.length === 0 ? null : (
3232
<div className="flex flex-col h-screen">
33-
<h1 className="font-bold mb-2">History</h1>
33+
<h1 className="font-bold mb-2">Versions</h1>
3434
<ScrollArea className="flex-1 overflow-y-auto">
3535
<ul className="space-y-0 flex flex-col-reverse">
3636
{history.map((item, index) => (
@@ -58,6 +58,11 @@ export default function HistoryDisplay({
5858
<h2 className="text-sm">(parent: v{item.parent + 1})</h2>
5959
)}
6060
</div>
61+
<h2 className="text-sm">
62+
{item.type === "ai_edit"
63+
? item.inputs.prompt
64+
: item.inputs.image_url}
65+
</h2>
6166
<h2 className="text-sm">v{index + 1}</h2>
6267
</li>
6368
))}

0 commit comments

Comments
 (0)
0