Skip to content

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

Python

clean up

Abi Rajab45e9dea29b6
diff --git a/frontend/src/components/history/utils.ts b/frontend/src/components/history/utils.ts
index cfa61712..cfdfbbce 100644
--- a/frontend/src/components/history/utils.ts
+++ b/frontend/src/components/history/utils.ts
@@ -8,9 +8,7 @@ export function extractHistoryTree(
let currentIndex: number | null = version;
while (currentIndex !== null) {
- // TODO: Handle currentIndex being out of bounds
const item: HistoryItem = history[currentIndex];
- console.log(item);
if (item) {
if (item.type === "ai_create") {
@@ -24,6 +22,7 @@ export function extractHistoryTree(
// Move to the parent of the current item
currentIndex = item.parentIndex;
} else {
+ // TODO: Throw an exception here?
// Break the loop if the item is not found (should not happen in a well-formed history)
break;
}