π OpenHands: AI-Driven Development
show most recent convo on homepage (#5769)
Robert Brennan5bf55a00359e
diff --git a/frontend/src/api/open-hands.ts b/frontend/src/api/open-hands.tsindex 23694a09e7..9093514a63 100644--- a/frontend/src/api/open-hands.ts+++ b/frontend/src/api/open-hands.ts@@ -260,6 +260,8 @@ class OpenHands {args: params.args,selected_repository: params.selectedRepository,});+ // TODO: remove this once we have a multi-conversation UI+ localStorage.setItem("latest_conversation_id", data.conversation_id);return data;}}diff --git a/frontend/src/routes/_oh._index/route.tsx b/frontend/src/routes/_oh._index/route.tsxindex 64190bcd58..69f46dd0c2 100644--- a/frontend/src/routes/_oh._index/route.tsx+++ b/frontend/src/routes/_oh._index/route.tsx@@ -31,13 +31,15 @@ function Home() {gitHubClientId: config?.GITHUB_CLIENT_ID || null,});+ const latestConversation = localStorage.getItem("latest_conversation_id");+return (<divdata-testid="root-index"className="bg-root-secondary h-full rounded-xl flex flex-col items-center justify-center relative overflow-y-auto"><HeroHeading />- <div className="flex flex-col gap-16 w-[600px] items-center">+ <div className="flex flex-col gap-8 w-[600px] items-center"><div className="flex flex-col gap-2 w-full"><TaskForm ref={formRef} /></div>@@ -67,6 +69,19 @@ function Home() {/></div></div>+ {latestConversation && (+ <div className="flex gap-4 w-full text-center mt-8">+ <p className="text-center w-full">+ Or + <a+ className="underline"+ href={`/conversations/${latestConversation}`}+ >+ jump back to your most recent conversation+ </a>+ </p>+ </div>+ )}</div>);}