mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 15:03:16 +00:00
fix: Dont wrap layout in Github app provide since not all require it (#549)
* fix: Dont wrap layout in Github app provide since not all require it * cr * cr
This commit is contained in:
parent
83771e3ff7
commit
c5aefa09f6
4 changed files with 15 additions and 12 deletions
|
|
@ -25,7 +25,6 @@ export default function ThreadPage({
|
|||
}) {
|
||||
const router = useRouter();
|
||||
const { thread_id } = use(params);
|
||||
const { currentInstallation } = useGitHubAppProvider();
|
||||
const stream = useStream<ManagerGraphState>({
|
||||
apiUrl: process.env.NEXT_PUBLIC_API_URL ?? "",
|
||||
assistantId: MANAGER_GRAPH_ID,
|
||||
|
|
@ -36,7 +35,6 @@ export default function ThreadPage({
|
|||
|
||||
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
||||
assistantId: MANAGER_GRAPH_ID,
|
||||
currentInstallation,
|
||||
disableOrgFiltering: true,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import type { Metadata } from "next";
|
||||
import "../../globals.css";
|
||||
import React, { Suspense } from "react";
|
||||
import { GitHubAppProvider } from "@/providers/GitHubApp";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Open SWE - Chat",
|
||||
|
|
@ -18,9 +17,5 @@ export default function RootLayout({
|
|||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<GitHubAppProvider>{children}</GitHubAppProvider>
|
||||
</Suspense>
|
||||
);
|
||||
return <Suspense fallback={<div>Loading...</div>}>{children}</Suspense>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
import { DefaultView } from "@/components/v2/default-view";
|
||||
import { useThreadsSWR } from "@/hooks/useThreadsSWR";
|
||||
import { useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||
import { GitHubAppProvider, useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import { Suspense } from "react";
|
||||
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
||||
|
||||
export default function ChatPage() {
|
||||
function ChatPageComponent() {
|
||||
const { currentInstallation } = useGitHubAppProvider();
|
||||
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
||||
assistantId: MANAGER_GRAPH_ID,
|
||||
|
|
@ -30,3 +30,11 @@ export default function ChatPage() {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function ChatPage() {
|
||||
return (
|
||||
<GitHubAppProvider>
|
||||
<ChatPageComponent />
|
||||
</GitHubAppProvider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { useThreadsSWR } from "@/hooks/useThreadsSWR";
|
|||
import { ThreadCard, ThreadCardLoading } from "@/components/v2/thread-card";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { InstallationSelector } from "@/components/github/installation-selector";
|
||||
import { useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||
import { GitHubAppProvider, useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
||||
import { useThreadsStatus } from "@/hooks/useThreadsStatus";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
|
@ -260,7 +260,9 @@ function AllThreadsPageContent() {
|
|||
export default function AllThreadsPage() {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<AllThreadsPageContent />
|
||||
<GitHubAppProvider>
|
||||
<AllThreadsPageContent />
|
||||
</GitHubAppProvider>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue